From: Pavel Machek <pavel@ucw.cz>
To: kernel-janitors@vger.kernel.org
Subject: Re: [Patch] Staging: winbond: usb_free_urb(NULL) is safe
Date: Thu, 30 May 2013 09:38:49 +0000 [thread overview]
Message-ID: <20130530093849.GA11173@amd.pavel.ucw.cz> (raw)
In-Reply-To: <51A6D6F6.1050204@gmail.com>
On Thu 2013-05-30 07:11:24, Julia Lawall wrote:
> > diff -uprN a/drivers/staging/winbond/wb35reg.c b/drivers/staging/winbond/wb35reg.c
> > --- a/drivers/staging/winbond/wb35reg.c 2013-05-28 00:52:26.000000000 +0530
> > +++ b/drivers/staging/winbond/wb35reg.c 2013-05-28 02:11:35.000000000 +0530
> > @@ -64,12 +64,11 @@ unsigned char Wb35Reg_BurstWrite(struct
> >
> > return true;
> > } else {
> > - if (urb)
> > - usb_free_urb(urb);
> > + usb_free_urb(urb);
>
> I took a look at this case. Wouldn't it be nicer to check for failures
> one by one, as done almost everywhere else in the kernel? Then you would
> know what had been successfully allocated and what has to be freed.
Yeah, that code needs lot of improvements. No, we probably will not
make it perfect by single patch.
(Original patch:)
Acked-by: Pavel Machek <pavel@ucw.cz>
Does someone have the hardware, BTW? I have single instance here, I
need to power it up some day. It was apparently sold as an USB card,
too... (I have version built-in obscure netbook).
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
prev parent reply other threads:[~2013-05-30 9:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 4:47 [Patch] Staging: winbond: usb_free_urb(NULL) is safe Harsh Kumar
2013-05-30 5:11 ` Julia Lawall
2013-05-30 6:50 ` Harsh Kumar
2013-05-30 7:28 ` Julia Lawall
2013-05-30 7:43 ` Julia Lawall
2013-05-30 7:50 ` Harsh Kumar
2013-05-30 7:55 ` Harsh Kumar
2013-05-30 9:38 ` Pavel Machek [this message]
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=20130530093849.GA11173@amd.pavel.ucw.cz \
--to=pavel@ucw.cz \
--cc=kernel-janitors@vger.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