From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Frank Rowand <frowand.list@gmail.com>
Subject: Re: [PATCH v1 1/1] of/platform: Propagate firmware node by calling device_set_node()
Date: Thu, 15 Jun 2023 20:20:36 +0300 [thread overview]
Message-ID: <ZItIZHfCji4EhfXk@smile.fi.intel.com> (raw)
In-Reply-To: <ZItGzw5HO/GFoRAD@smile.fi.intel.com>
On Thu, Jun 15, 2023 at 08:13:52PM +0300, Andy Shevchenko wrote:
> On Thu, Jun 15, 2023 at 10:44:52AM -0600, Rob Herring wrote:
> > On Thu, Jun 15, 2023 at 06:03:52PM +0300, Andy Shevchenko wrote:
> > > On Thu, Jun 15, 2023 at 06:01:17PM +0300, Andy Shevchenko wrote:
> > > > On Thu, Jun 15, 2023 at 05:59:52PM +0300, Andy Shevchenko wrote:
> > > > > On Thu, Jun 15, 2023 at 05:52:43PM +0300, Andy Shevchenko wrote:
...
> > > > > in the code which seems to me problematic in two ways:
> > > > > 1) (minor) the dev_set_name() may fail, no checks are there;
> >
> > Is there anything besides a memory alloc failure? What will print a
> > message already. Wouldn't we fail a bit later on when adding the
> > device anyways?
>
> I don't see how we fail. Any pointers?
Okay, code in question:
/* subsystems can specify simple device enumeration */
if (!dev_name(dev) && dev->bus && dev->bus->dev_name)
dev_set_name(dev, "%s%u", dev->bus->dev_name, dev->id);
if (!dev_name(dev)) {
error = -EINVAL;
goto name_error;
}
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-06-15 17:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 14:52 [PATCH v1 1/1] of/platform: Propagate firmware node by calling device_set_node() Andy Shevchenko
2023-06-15 14:59 ` Andy Shevchenko
2023-06-15 15:01 ` Andy Shevchenko
2023-06-15 15:03 ` Andy Shevchenko
2023-06-15 16:44 ` Rob Herring
2023-06-15 17:13 ` Andy Shevchenko
2023-06-15 17:20 ` Andy Shevchenko [this message]
2023-06-15 16:48 ` Rob Herring
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=ZItIZHfCji4EhfXk@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/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.