From: Johan Hovold <johan@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mitchell Tasman <tasman@leaflabs.com>,
Alex Elder <elder@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: fix an error handling bug in gb_svc_hello()
Date: Wed, 2 Feb 2022 11:27:40 +0100 [thread overview]
Message-ID: <YfpcnDRAyeyoxi10@hovoldconsulting.com> (raw)
In-Reply-To: <20220202072016.GA6748@kili>
On Wed, Feb 02, 2022 at 10:20:16AM +0300, Dan Carpenter wrote:
> Cleanup if gb_svc_queue_deferred_request() fails.
>
> Fixes: ee2f2074fdb2 ("greybus: svc: reconfig APBridgeA-Switch link to handle required load")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> From static analysis. Not tested.
Look correct. Thanks, Dan.
This part of Greybus no longer lives in staging and the prefix should be
greybus: svc:
I'd also prefer to see all error labels use an err_ prefix consistently.
When looking at this code I found another bug so I'll fix up the above
nits and send a series with both fixes as there will be a dependency.
> drivers/greybus/svc.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c
> index ce7740ef449b..b19651048081 100644
> --- a/drivers/greybus/svc.c
> +++ b/drivers/greybus/svc.c
> @@ -866,8 +866,14 @@ static int gb_svc_hello(struct gb_operation *op)
>
> gb_svc_debugfs_init(svc);
>
> - return gb_svc_queue_deferred_request(op);
> + ret = gb_svc_queue_deferred_request(op);
> + if (ret)
> + goto remove_debugfs;
> +
> + return 0;
>
> +remove_debugfs:
> + gb_svc_debugfs_exit(svc);
> err_unregister_device:
> gb_svc_watchdog_destroy(svc);
> device_del(&svc->dev);
Johan
prev parent reply other threads:[~2022-02-02 10:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 7:20 [PATCH] staging: greybus: fix an error handling bug in gb_svc_hello() Dan Carpenter
2022-02-02 10:27 ` Johan Hovold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YfpcnDRAyeyoxi10@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tasman@leaflabs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.