From: Dan Carpenter <dan.carpenter@linaro.org>
To: Saravana Kannan <saravanak@google.com>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] driver core: Fix an error handling path in fw_devlink_create_devlink()
Date: Tue, 18 Jul 2023 09:12:43 +0300 [thread overview]
Message-ID: <cce2a2ac-e0e7-45ec-9093-88e7acf78865@kadam.mountain> (raw)
In-Reply-To: <CAGETcx91Vm60Os5fw7-kNQ6bGjYaPhOeEutyBy_GLQA62f6vfA@mail.gmail.com>
On Mon, Jul 17, 2023 at 11:57:51AM -0700, Saravana Kannan wrote:
> > ---
> > drivers/base/core.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/core.c b/drivers/base/core.c
> > index 3dff5037943e..854c1fab742c 100644
> > --- a/drivers/base/core.c
> > +++ b/drivers/base/core.c
> > @@ -2107,7 +2107,8 @@ static int fw_devlink_create_devlink(struct device *con,
> > fwnode_ancestor_init_without_drv(sup_handle)) {
> > dev_dbg(con, "Not linking %pfwf - might never become dev\n",
> > sup_handle);
> > - return -EINVAL;
> > + ret = -EINVAL;
> > + goto out;
> > }
> >
> > ret = -EAGAIN;
It would have been more obvious that put_device() is a no-op if this
ret = -EAGAIN were changed to "return -EAGAIN;". That would probably
silence some sort of static checker warning...
regards,
dan carpenter
prev parent reply other threads:[~2023-07-18 6:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 18:26 Christophe JAILLET
2023-07-17 18:57 ` Saravana Kannan
2023-07-17 19:32 ` Christophe JAILLET
2023-07-18 6:12 ` Dan Carpenter [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=cce2a2ac-e0e7-45ec-9093-88e7acf78865@kadam.mountain \
--to=dan.carpenter@linaro.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=saravanak@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®