On Wed, May 28, 2014 at 6:37 PM, Yijing Wang <wangyijing@xxxxxxxxxx> wrote: >>> I found some kernel code still check this return value, and I also think return the >>> real retval make sense. >> >> No, that is not right. >> >> If you look closely, >> >> device_attach() returns >> 1: success >> 0: not attached >> <0: fail. > > Hi Yinghai, > Thanks for your explanation. > I found all the kernel code to check its return value, only for print a warning for users. > > > So I think we can drop all return checking from calling path I prefer this one. as pci_bus_add_device already have > WARN_ON(retval < 0); There is no need to print warning message later again. Thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html