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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 5 Oct 2021 14:34:03 +0100
From:   Robert Greener <rob@...greener.com>
To:     unlisted-recipients:; (no To-header on input)
Subject: [PATCH 10/13] usb: core: config: fix checkpatch.pl braces warning

This fixes the following checkpatch.pl warnings:

core/config.c:268: CHECK:BRACES: braces {} should be used on all arms of this statement
core/config.c:272: CHECK:BRACES: Unbalanced braces around else statement
core/config.c:649: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Robert Greener <rob@...greener.com>
---
 drivers/usb/core/config.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 9717f89bcb6f..76038e8c84c5 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -265,11 +265,12 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
 	buffer += d->bLength;
 	size -= d->bLength;
 
-	if (d->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE)
+	if (d->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE) {
 		n = USB_DT_ENDPOINT_AUDIO_SIZE;
-	else if (d->bLength >= USB_DT_ENDPOINT_SIZE)
+	}
+	else if (d->bLength >= USB_DT_ENDPOINT_SIZE) {
 		n = USB_DT_ENDPOINT_SIZE;
-	else {
+	} else {
 		dev_warn(ddev,
 			 "config %d interface %d altsetting %d has an invalid endpoint descriptor of length %d, skipping\n",
 			 cfgno, inum, asnum, d->bLength);
@@ -646,7 +647,6 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
 	for ((buffer2 = buffer, size2 = size);
 	      size2 > 0;
 	     (buffer2 += header->bLength, size2 -= header->bLength)) {
-
 		if (size2 < sizeof(struct usb_descriptor_header)) {
 			dev_warn(ddev,
 				 "config %d descriptor has %d excess byte%s, ignoring\n",
-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ