Re: [PATCH 3/4] amba: Make the remove callback return void

From
Arnd Bergmann <arnd@kernel.org>
Date
2020-11-24 11:48:25
Also in
lkml
Reply to
Uwe Kleine-König, 2020-11-24
On Tue, Nov 24, 2020 at 11:32 AM Uwe Kleine-König
[off-list ref] wrote:
Most amba drivers return 0 in their remove callback. Together with the
driver core ignoring the return value anyhow, it doesn't make sense to
return a value here.

So add a warning to the only driver that could return an error code and
change the remove prototype to return void, which makes it explicit that
returning an error value doesn't work as expected. This simplifies changing
the core remove callback to return void, too.

Signed-off-by: Uwe Kleine-König <redacted>
Makes sense, I checked that the vfio driver cannot actually return an error
either, the 'if (vdev)' check seems to be done out of unnecessary caution,
as the probe would never have succeeded if that was NULL.

         Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (11 messages) 11 messages, 3 authors, last reply 2020-11-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help