Re: [PATCH] vio: make remove callback return void
From: Sukadev Bhattiprolu <hidden>
Date: 2021-01-28 19:12:45
Uwe Kleine-König [uwe@kleine-koenig.org] wrote:
The driver core ignores the return value of struct bus_type::remove() because there is only little that can be done. To simplify the quest to make this function return void, let struct vio_driver::remove() return void, too. All users already unconditionally return 0, this commit makes it obvious that returning an error code is a bad idea and makes it obvious for future driver authors that returning an error code isn't intended.
Slightly off-topic, should ndo_stop() also return a void? Its return value
seems to be mostly ignored and __dev_close_many() has:
/*
* Call the device specific close. This cannot fail.
* Only if device is UP
*
* We allow it to be called even after a DETACH hot-plug
* event.
*/
if (ops->ndo_stop)
ops->ndo_stop(dev);
Sukadev