• Uwe Kleine-König's avatar
    platform: Make platform_driver::remove() return void · 0edb555a
    Uwe Kleine-König authored
    struct platform_driver::remove returning an integer made driver authors
    expect that returning an error code was proper error handling. However
    the driver core ignores the error and continues to remove the device
    because there is nothing the core could do anyhow and reentering the
    remove callback again is only calling for trouble.
    
    To prevent such wrong assumptions, change the return type of the remove
    callback to void. This was prepared by introducing an alternative remove
    callback returning void and converting all drivers to that. So .remove()
    can be changed without further changes in drivers.
    
    This corresponds to step b) of the plan outlined in commit
    5c5a7680 ("platform: Provide a remove callback that returns no value").
    Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
    0edb555a
platform.c 37.7 KB