Re: [PATCH v2] scsi: bsg: fix errno when scsi_bsg_register_queue fails

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

 



On Thu, Dec 23, 2021 at 10:42:30AM +0800, Jackie Liu wrote:
> I see, Thanks for point out, after commit ee37e09d81a4 ("[SCSI] fix
> duplicate removal on error path in scsi_sysfs_add_sdev"), Before this
> errno will be forced to return 0.
>
> After:
>
> [1] error = device_create_file(&sdev->sdev_gendev,  	
>                            sdev->host->hostt->sdev_attrs[i]);
>
> Then:
>
> with 92c4b58b15c5 ("scsi: core: Register sysfs attributes earlier")
> delete code [1], so we force return errno.
>
> I don’t know if I should restore the original logic or delete
> this comment information. Guenter and Christoph, What do you think? I
> can send another patch based on this.

I think we should just handle the error properly and remove the comment.
There's no good reason to ignore bsg registration errors.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux