[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d28be71c181a0626326d558a6dd3a59a5ad5aeb6.1633442131.git.rob@robgreener.com>
Date: Tue, 5 Oct 2021 13:37:30 +0100
From: Robert Greener <rob@...greener.com>
To: unlisted-recipients:; (no To-header on input)
Subject: [PATCH 04/13] usb: core: config: Avoid multiple line derefrence
Fix the following checkpatch warning:
core/config.c:816: WARNING:MULTILINE_DEREFERENCE: Avoid multiple line dereference - prefer 'intfc->altsetting[n].desc.bAlternateSetting'
Signed-off-by: Robert Greener <rob@...greener.com>
---
drivers/usb/core/config.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 5de26d64a00b..f6c90214bba0 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -812,8 +812,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
intfc = config->intf_cache[i];
for (j = 0; j < intfc->num_altsetting; ++j) {
for (n = 0; n < intfc->num_altsetting; ++n) {
- if (intfc->altsetting[n].desc.
- bAlternateSetting == j)
+ if (intfc->altsetting[n].desc.bAlternateSetting == j)
break;
}
if (n >= intfc->num_altsetting)
--
2.32.0
Powered by blists - more mailing lists