lkml.org 
[lkml]   [2020]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] m68k/amiga: Add missing platform_device_unregister() call in amiga_init_devices()
From
Date
> Add the missing platform_device_unregister() before return
> from amiga_init_devices() in the error handling case.

Will the tag “Fixes” become helpful for the commit message?



> +++ b/arch/m68k/amiga/platform.c
> @@ -188,8 +188,10 @@ static int __init amiga_init_devices(void)
> return PTR_ERR(pdev);
> error = platform_device_add_data(pdev, &a1200_ide_pdata,
> sizeof(a1200_ide_pdata));
> - if (error)
> + if (error) {
> + platform_device_unregister(pdev);
> return error;
> + }
> }


I suggest to add a jump target for the desired exception handling.

if (error)
+ goto unregister_device;


Regards,
Markus

\
 
 \ /
  Last update: 2020-07-28 16:51    [W:0.033 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site