Re: [Patch] Staging: winbond: usb_free_urb(NULL) is safe

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

 



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@xxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux