Re: [PATCH 03/10] driver core: Flow the return code from ->probe() through to sysfs bind

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

 



> index 36d0c654ea6124..03591f82251302 100644
> --- a/drivers/base/bus.c
> +++ b/drivers/base/bus.c
> @@ -212,13 +212,9 @@ static ssize_t bind_store(struct device_driver *drv, const char *buf,
>  	dev = bus_find_device_by_name(bus, NULL, buf);
>  	if (dev && dev->driver == NULL && driver_match_device(drv, dev)) {
>  		err = device_driver_attach(drv, dev);
> -
> -		if (err > 0) {
> +		if (!err) {
>  			/* success */
>  			err = count;
> -		} else if (err == 0) {
> -			/* driver didn't accept device */
> -			err = -ENODEV;
>  		}
>  	}

I think we can also drop the dev->driver == NULL check above given
that device_driver_attach covers it now.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux