[PATCH] usb:hub: readibility and consistency in coding style

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

 



It is suggested to keep braces if there is a comment in if case as
comment also takes a line.
---
 drivers/usb/core/hub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 82059f26..f43e6302 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -5334,10 +5334,10 @@ static int descriptors_changed(struct usb_device *udev,
        }

        buf = kmalloc(len, GFP_NOIO);
-       if (!buf)
+       if (!buf) {
                /* assume the worst */
                return 1;
-
+       }
        for (index = 0; index < udev->descriptor.bNumConfigurations; index++) {
                old_length = le16_to_cpu(udev->config[index].desc.wTotalLength);
                length = usb_get_descriptor(udev, USB_DT_CONFIG, index, buf,
--
2.10.2.windows.1
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux