diff mbox series

[2/2] usb: mtu3: mtu3_debug: remove an unused struct member

Message ID X8ikv1QA3Do50D+R@mwanda
State New
Headers show
Series [1/2] usb: mtu3: fix memory corruption in mtu3_debugfs_regset() | expand

Commit Message

Dan Carpenter Dec. 3, 2020, 8:41 a.m. UTC
The "nregs" member is not used.  The code uses the "regset.nregs"
struct member instead.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/usb/mtu3/mtu3_debug.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Chunfeng Yun Dec. 4, 2020, 2:07 a.m. UTC | #1
On Thu, 2020-12-03 at 11:41 +0300, Dan Carpenter wrote:
> The "nregs" member is not used.  The code uses the "regset.nregs"

> struct member instead.

> 

> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

> ---

>  drivers/usb/mtu3/mtu3_debug.h | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/drivers/usb/mtu3/mtu3_debug.h b/drivers/usb/mtu3/mtu3_debug.h

> index 3084c46017c3..9a36134b322d 100644

> --- a/drivers/usb/mtu3/mtu3_debug.h

> +++ b/drivers/usb/mtu3/mtu3_debug.h

> @@ -19,7 +19,6 @@ struct ssusb_mtk;

>  struct mtu3_regset {

>  	char name[MTU3_DEBUGFS_NAME_LEN];

>  	struct debugfs_regset32 regset;

> -	size_t nregs;

>  };

Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com>


Thanks a lot

>  

>  struct mtu3_file_map {
diff mbox series

Patch

diff --git a/drivers/usb/mtu3/mtu3_debug.h b/drivers/usb/mtu3/mtu3_debug.h
index 3084c46017c3..9a36134b322d 100644
--- a/drivers/usb/mtu3/mtu3_debug.h
+++ b/drivers/usb/mtu3/mtu3_debug.h
@@ -19,7 +19,6 @@  struct ssusb_mtk;
 struct mtu3_regset {
 	char name[MTU3_DEBUGFS_NAME_LEN];
 	struct debugfs_regset32 regset;
-	size_t nregs;
 };
 
 struct mtu3_file_map {