Linux-m68k Archive on lore.kernel.org
 help / color / Atom feed
* Re: [PATCH] m68k/amiga: Add missing platform_device_unregister() call in amiga_init_devices()
@ 2020-07-28 14:50 Markus Elfring
  2020-07-28 15:54 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2020-07-28 14:50 UTC (permalink / raw)
  To: Qinglang Miao, linux-m68k
  Cc: kernel-janitors, linux-kernel, Geert Uytterhoeven,
	Greg Kroah-Hartman, Stephen Rothwell

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] m68k/amiga: Add missing platform_device_unregister() call in amiga_init_devices()
  2020-07-28 14:50 [PATCH] m68k/amiga: Add missing platform_device_unregister() call in amiga_init_devices() Markus Elfring
@ 2020-07-28 15:54 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2020-07-28 15:54 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Qinglang Miao, linux-m68k, kernel-janitors, linux-kernel,
	Geert Uytterhoeven, Stephen Rothwell

On Tue, Jul 28, 2020 at 04:50:06PM +0200, Markus Elfring wrote:
> > 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

Hi,

This is the semi-friendly patch-bot of Greg Kroah-Hartman.

Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list.  I strongly suggest that you not do this anymore.  Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.

Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all.  The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback.  Please feel free to also ignore emails
from them.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 14:50 [PATCH] m68k/amiga: Add missing platform_device_unregister() call in amiga_init_devices() Markus Elfring
2020-07-28 15:54 ` Greg Kroah-Hartman

Linux-m68k Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-m68k/0 linux-m68k/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-m68k linux-m68k/ https://lore.kernel.org/linux-m68k \
		linux-m68k@vger.kernel.org linux-m68k@lists.linux-m68k.org
	public-inbox-index linux-m68k

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-m68k


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git