Re: [PATCH] sh: sh4: Fix reference count leak in sq_dev_add

2020-07-25 Thread Markus Elfring
> kobject_init_and_add() takes reference even when it fails. If this > function returns an error, kobject_put() must be called to properly > clean up the memory associated with the object. * An imperative wording can be preferred for the change description, can't it? * Would you like to add the

Re: [PATCH] sh: sh4: Fix reference count leak in sq_dev_add

2020-07-25 Thread Markus Elfring
> kobject_init_and_add() takes reference even when it fails. If this > function returns an error, kobject_put() must be called to properly > clean up the memory associated with the object. * An imperative wording can be preferred for the change description, can't it? * Would you like to add the

[PATCH] sh: sh4: Fix reference count leak in sq_dev_add

2020-07-24 Thread Yi Wang
From: Liao Pingfang kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang --- arch/sh/kernel/cpu/sh4/sq.c | 2 ++