Re: [PATCH 1/2] i2c: Warn when device removing fails

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

 



On Thu, Nov 26, 2020 at 08:23:30AM +0100, Uwe Kleine-König wrote:
> The driver core ignores the return value of struct bus_type::remove. So
> warn if there is an error that went unnoticed before and return 0
> unconditionally in i2c_device_remove().

I wondered about the "return 0" part...

> 
> This prepares changing struct bus_type::remove to return void.

... until I read this. You are working on that?

>  	if (driver->remove) {
> +		int status = 0;

No need to initialize to 0, or?

> +
>  		dev_dbg(dev, "remove\n");
> +
>  		status = driver->remove(client);
> +		if (status)
> +			dev_warn(dev, "remove failed (%pe), will be ignored\n", ERR_PTR(status));

The rest and patch 2 look good.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux