Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1301711
| From | Peter Senna Tschudin <peter.senna@collabora.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 0/5] usb-misc: cleanup sisusbvga |
| Date | 2016-01-05 18:00 +0100 |
| Message-ID | <qND7I-5u9-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
The file drivers/usb/misc/sisusbvga/sisusb.c had many (192) coding style issues reported by checkpatch. This file also had a problematic error path in the probe function that could result in dereferencing a null pointer. This patch series fix coding style issues and fix the problematic error path to avoid the null pointer dereference. Patch 1 is the biggest and fix only whitespace, tab and newline issues. I used $ git diff -w --word-diff=porcelain drivers/usb/misc/sisusbvga/sisusb.c to verify that this patch do not change any visible character. If the size of this patch is a problem, please let me know in how many patches to split it. Patch 2 follows fixing trivial coding style, mostly related to braces, and parenthesis. Patch 3 remove assignments from if tests. Patch 4 remove calls to dev_err() on memory allocation failures and fix one error path to avoid dereferencing a null pointer. The patch change the problematic error path to cleanup previously allocated resources and abort the probe with -ENOMEM instead of only calling dev_err() and continue with the probe. Patch 5 remove null tests before calls to kfree(). Peter Senna Tschudin (5): usb-misc: sisusbvga: Fix coding style: white space usb-misc: sisusbvga: Fix coding style: braces, parenthesis, comment usb-misc: sisusbvga: Fix coding style: remove assignment from if tests usb-misc: sisusbvga: Remove memory allocation logs and fix error path usb-misc: sisusbvga: Remove null test before calls to kfree() drivers/usb/misc/sisusbvga/sisusb.c | 1543 +++++++++++++++++------------------ 1 file changed, 752 insertions(+), 791 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 0/5] usb-misc: cleanup sisusbvga Peter Senna Tschudin <peter.senna@collabora.com> - 2016-01-05 18:00 +0100
[PATCH 5/5] usb-misc: sisusbvga: Remove null test before kfree() Peter Senna Tschudin <peter.senna@collabora.com> - 2016-01-05 18:00 +0100
[PATCH 3/5] usb-misc: sisusbvga: Remove assignments from if tests Peter Senna Tschudin <peter.senna@collabora.com> - 2016-01-05 18:00 +0100
Re: [PATCH 0/5] usb-misc: cleanup sisusbvga Joe Perches <joe@perches.com> - 2016-01-05 20:00 +0100
Re: [PATCH 0/5] usb-misc: cleanup sisusbvga Peter Senna Tschudin <peter.senna@collabora.com> - 2016-01-06 16:40 +0100
Re: [PATCH 0/5] usb-misc: cleanup sisusbvga Joe Perches <joe@perches.com> - 2016-01-06 17:10 +0100
csiph-web