Re: [PATCH v0] USB: storage: karma: fix rio_karma_init return

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

 



Hello Alan,

Sorry for the delay. I've sent another version of this patch.

> 
> That isn't true.  Look again at the code:
> 
> > /*
> >  * Just before we start our control thread, initialize
> >  * the device if it needs initialization
> >  */
> >  if (us->unusual_dev->initFunction) {
> >      p = us->unusual_dev->initFunction(us);
> >      if (p)
> >          return p;
> 
> If p isn't zero then this function uses p as its return value.  Thus it 
> does more with p than just check whether it is zero.
> 

Yeah, you are right. Well what I mean about the "bad thing" is that something wrong but the usb core continue to install this driver, just like what the karam driver is doing.

> >  }
> > 
> > I will then send patches to make sure all initFunction follow the standard.
> > 
> > > 
> > > And don't forget the error code for when the rio_karma_send_command() 
> > > call fails.  In that case the return value should be -EIO.
> > > 
> > 
> > Okay, will add this in next version of this patch.
> > 
> > > 
> > > Shouldn't this also be marked for the stable kernels?
> > > 
> > 
> > Sorry, I didn't get it, do you mean add another tag like "Cc: stable@xxxxxxxxxxxxxxx"?
> > Or I just need to CC the mail to stable mail list?
> 
> I mean add another tag.  See the description of Option 1 in 
> Documentation/process/stable-kernel-rules.rst.
> 

Cool, have added this one.
Link: https://marc.info/?l=linux-usb&m=164965695228314&w=2

Thanks
Lin Ma

> Alan Stern
> 
> > 
> > Regards
> > Lin




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux