public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: sundar <prosunofficial@gmail.com>,
	heikki.krogerus@linux.intel.com,  gregkh@linuxfoundation.org,
	neil.armstrong@linaro.org,  dmitry.baryshkov@linaro.org,
	u.kleine-koenig@pengutronix.de,  christophe.jaillet@wanadoo.fr
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	 skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com
Subject: Re: [PATCH v2] remove indentation for common path [linux-next]
Date: Sat, 20 Apr 2024 18:27:44 -0700	[thread overview]
Message-ID: <c24dc77d4c339d1b1ba4a76cf7c365d970cfca41.camel@perches.com> (raw)
In-Reply-To: <b6f3d628-077e-486a-97f2-267324a76e9c@gmail.com>

On Sun, 2024-04-21 at 06:13 +0530, sundar wrote:
> On 20/04/24 22:37, Joe Perches wrote:
> > On Sat, 2024-04-20 at 22:19 +0530, sundar wrote:
> > 
> > 
> > > ```
> > @@ -321,35 +321,37 @@ static int nb7vpq904m_parse_data_lanes_mapping(struct nb7vpq904m *nb7)
> >   
> >   	ep = of_graph_get_endpoint_by_regs(nb7->client->dev.of_node, 1, 0);
> >   
> > -	if (ep) {
> > -		ret = of_property_count_u32_elems(ep, "data-lanes");
> > -		if (ret == -EINVAL)
> > -			/* Property isn't here, consider default mapping */
> > -			goto out_done;
> > -		if (ret < 0)
> > -			goto out_error;
> > -
> > -		if (ret != DATA_LANES_COUNT) {
> > -			dev_err(&nb7->client->dev, "expected 4 data lanes\n");
> > -			ret = -EINVAL;
> > -			goto out_error;
> > -		}
> > +	if (!ep)
> > +		return 0;
> > ```
> > 
> > 
> > Not equivalent code as the out_error:
> > 
> > 	of_node_put(ep);
> > 
> > isn't done
> > 
> > 
> 
> Hi joe perches,
> 
> If ep is null,  I believe we dont need to call of_node_put.  Because 
> passing null pointer to of_node_put() make no difference.
> 
> In of_node_put() definition, if pointer is null, there is no operation.
> 

Fine, but you should explain that in the changelog
and not make reviewers look it up.


  reply	other threads:[~2024-04-21  1:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-20 16:49 [PATCH v2] remove indentation for common path [linux-next] sundar
2024-04-20 17:07 ` Joe Perches
2024-04-21  0:43   ` sundar
2024-04-21  1:27     ` Joe Perches [this message]
2024-04-20 20:47 ` Dmitry Baryshkov
2024-04-21  0:52   ` sundar

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=c24dc77d4c339d1b1ba4a76cf7c365d970cfca41.camel@perches.com \
    --to=joe@perches.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=prosunofficial@gmail.com \
    --cc=skhan@linuxfoundation.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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