[PATCH 10/13] usb: core: config: fix checkpatch.pl braces warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux