[PATCH] ARM: mmp: Fix failure to remove sram device

Greg Kroah-Hartman gregkh at linuxfoundation.org
Thu Aug 5 04:16:35 PDT 2021


On Mon, Jul 26, 2021 at 10:01:58PM +0200, Uwe Kleine-König wrote:
> Make sure in .probe() to set driver data before the function is left to
> make it possible in .remove() to undo the actions done.
> 
> This fixes a potential memory leak and stops returning an error code in
> .remove() that is ignored by the driver core anyhow.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> ---
>  arch/arm/mach-mmp/sram.c | 22 ++++++++++++----------
>  1 file changed, 12 insertions(+), 10 deletions(-)

Reviewed-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>



More information about the linux-arm-kernel mailing list