lkml.org 
[lkml]   [2020]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/4] amba: Make the remove callback return void
On Tue, Nov 24, 2020 at 11:32 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> 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 <u.kleine-koenig@pengutronix.de>

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

\
 
 \ /
  Last update: 2020-11-24 12:49    [W:0.127 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site