mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Senna Tschudin <peter.senna@collabora.com>
To: thomas@winischhofer.net, gregkh@linuxfoundation.org,
	trivial@kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Peter Senna Tschudin <peter.senna@collabora.com>
Subject: [PATCH 0/5] usb-misc: cleanup sisusbvga
Date: Tue,  5 Jan 2016 17:54:05 +0100	[thread overview]
Message-ID: <1452012850-6990-1-git-send-email-peter.senna@collabora.com> (raw)

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


             reply	other threads:[~2016-01-05 16:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 16:54 Peter Senna Tschudin [this message]
2016-01-05 16:54 ` [PATCH 1/5] usb-misc: sisusbvga: Fix coding style: white space Peter Senna Tschudin
2016-01-05 16:54 ` [PATCH 2/5] usb-misc: sisusbvga: Fix trivial coding style Peter Senna Tschudin
2016-01-05 16:54 ` [PATCH 3/5] usb-misc: sisusbvga: Remove assignments from if tests Peter Senna Tschudin
2016-01-05 16:54 ` [PATCH 4/5] usb-misc: sisusbvga: Remove kmalloc logs and fix error path Peter Senna Tschudin
2016-01-06 18:28   ` Sergei Shtylyov
2016-01-07 15:19     ` Peter Senna Tschudin
2016-01-05 16:54 ` [PATCH 5/5] usb-misc: sisusbvga: Remove null test before kfree() Peter Senna Tschudin
2016-01-05 18:53 ` [PATCH 0/5] usb-misc: cleanup sisusbvga Joe Perches
2016-01-06 15:30   ` Peter Senna Tschudin
2016-01-06 16:04     ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452012850-6990-1-git-send-email-peter.senna@collabora.com \
    --to=peter.senna@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=thomas@winischhofer.net \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®