kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] cxl: Fix kobject memory leak in cxl_sysfs_afu_new_cr()
@ 2020-06-02 17:20 Markus Elfring
  2020-06-03  1:42 ` wanghai (M)
  0 siblings, 1 reply; 10+ messages in thread
From: Markus Elfring @ 2020-06-02 17:20 UTC (permalink / raw)
  To: Wang Hai, linuxppc-dev
  Cc: Andrew Donnellan, Arnd Bergmann, Greg Kroah-Hartman,
	kernel-janitors, linux-kernel, Ian Munsie, Frederic Barrat

> Fix it by adding a call to kobject_put() in the error path of
> kobject_init_and_add().

Thanks for another completion of the exception handling.

Would an other patch subject be a bit nicer?


…
> +++ b/drivers/misc/cxl/sysfs.c
> @@ -624,7 +624,7 @@ static struct afu_config_record *cxl_sysfs_afu_new_cr(struct cxl_afu *afu, int c
>  	rc = kobject_init_and_add(&cr->kobj, &afu_config_record_type,
>  				  &afu->dev.kobj, "cr%i", cr->cr);
>  	if (rc)
> -		goto err;
> +		goto err1;
…

Can an other label be more reasonable here?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=f359287765c04711ff54fbd11645271d8e5ff763#n465

Regards,
Markus

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

end of thread, other threads:[~2020-06-03  6:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02 17:20 [PATCH] cxl: Fix kobject memory leak in cxl_sysfs_afu_new_cr() Markus Elfring
2020-06-03  1:42 ` wanghai (M)
2020-06-03  3:02   ` Michael Ellerman
2020-06-03  5:07     ` Markus Elfring
2020-06-03  6:14   ` [PATCH] " Greg Kroah-Hartman
2020-06-03  6:34     ` wanghai (M)
2020-06-03  6:50       ` Greg Kroah-Hartman
2020-06-03  6:54         ` wanghai (M)
2020-06-03  6:56       ` Markus Elfring
2020-06-03  6:48     ` [PATCH] " Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).