linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: fieldbus: anybuss: jump to correct label in an error path
@ 2020-10-12 13:24 Jing Xiangfeng
  2020-10-23 13:37 ` Sven Van Asbroeck
  0 siblings, 1 reply; 2+ messages in thread
From: Jing Xiangfeng @ 2020-10-12 13:24 UTC (permalink / raw)
  To: TheSven73, gregkh; +Cc: devel, linux-kernel, jingxiangfeng

In current code, controller_probe() misses to call ida_simple_remove()
in an error path. Jump to correct label to fix it.

Fixes: 17614978ed34 ("staging: fieldbus: anybus-s: support the Arcx anybus controller")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 drivers/staging/fieldbus/anybuss/arcx-anybus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fieldbus/anybuss/arcx-anybus.c b/drivers/staging/fieldbus/anybuss/arcx-anybus.c
index 5b8d0bae9ff3..b5fded15e8a6 100644
--- a/drivers/staging/fieldbus/anybuss/arcx-anybus.c
+++ b/drivers/staging/fieldbus/anybuss/arcx-anybus.c
@@ -293,7 +293,7 @@ static int controller_probe(struct platform_device *pdev)
 	regulator = devm_regulator_register(dev, &can_power_desc, &config);
 	if (IS_ERR(regulator)) {
 		err = PTR_ERR(regulator);
-		goto out_reset;
+		goto out_ida;
 	}
 	/* make controller info visible to userspace */
 	cd->class_dev = kzalloc(sizeof(*cd->class_dev), GFP_KERNEL);
-- 
2.17.1


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

* Re: [PATCH] staging: fieldbus: anybuss: jump to correct label in an error path
  2020-10-12 13:24 [PATCH] staging: fieldbus: anybuss: jump to correct label in an error path Jing Xiangfeng
@ 2020-10-23 13:37 ` Sven Van Asbroeck
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Van Asbroeck @ 2020-10-23 13:37 UTC (permalink / raw)
  To: Jing Xiangfeng; +Cc: Greg KH, devel, Linux Kernel Mailing List

Hi Jing, thank you for your patch.

Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com>

On Mon, Oct 12, 2020 at 9:17 AM Jing Xiangfeng <jingxiangfeng@huawei.com> wrote:
>
> In current code, controller_probe() misses to call ida_simple_remove()
> in an error path. Jump to correct label to fix it.
>
> Fixes: 17614978ed34 ("staging: fieldbus: anybus-s: support the Arcx anybus controller")
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
> ---
>  drivers/staging/fieldbus/anybuss/arcx-anybus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/fieldbus/anybuss/arcx-anybus.c b/drivers/staging/fieldbus/anybuss/arcx-anybus.c
> index 5b8d0bae9ff3..b5fded15e8a6 100644
> --- a/drivers/staging/fieldbus/anybuss/arcx-anybus.c
> +++ b/drivers/staging/fieldbus/anybuss/arcx-anybus.c
> @@ -293,7 +293,7 @@ static int controller_probe(struct platform_device *pdev)
>         regulator = devm_regulator_register(dev, &can_power_desc, &config);
>         if (IS_ERR(regulator)) {
>                 err = PTR_ERR(regulator);
> -               goto out_reset;
> +               goto out_ida;
>         }
>         /* make controller info visible to userspace */
>         cd->class_dev = kzalloc(sizeof(*cd->class_dev), GFP_KERNEL);
> --
> 2.17.1
>

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

end of thread, other threads:[~2020-10-23 13:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 13:24 [PATCH] staging: fieldbus: anybuss: jump to correct label in an error path Jing Xiangfeng
2020-10-23 13:37 ` Sven Van Asbroeck

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).