Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1533254
| From | Atul Raj <atul.r@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] usb:hub: readibility and consistency in coding style |
| Date | 2016-11-30 13:00 +0100 |
| Message-ID | <sJbIm-5Bx-17@gated-at.bofh.it> (permalink) |
| References | <sJbyF-5yf-5@gated-at.bofh.it> <sJbyF-5yf-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] usb:hub: readibility and consistency in coding style Atul Raj <atul.r@samsung.com> - 2016-11-30 13:00 +0100
Re: [PATCH] usb:hub: readibility and consistency in coding style "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2016-11-30 13:10 +0100
RE: Re: [PATCH] usb:hub: readibility and consistency in coding style Atul Raj <atul.r@samsung.com> - 2016-11-30 13:40 +0100
Re: Re: [PATCH] usb:hub: readibility and consistency in coding style "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2016-11-30 15:00 +0100
csiph-web