lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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