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.