All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yankejian (Hackim Yim)" <yankejian@huawei.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: net: hns: enet specifies a reference to dsaf
Date: Thu, 17 Mar 2016 06:48:55 +0000	[thread overview]
Message-ID: <56EA5357.5020902@huawei.com> (raw)
In-Reply-To: <20160316194851.GA20386@mwanda>

Hello dan,

Thanks for pointing it out. i will fix it in next submit.

MBR, Kejian

On 2016/3/17 3:48, Dan Carpenter wrote:
> Hello yankejian,
>
> The patch 48189d6aaf1e: "net: hns: enet specifies a reference to
> dsaf" from Jan 20, 2016, leads to the following static checker
> warning:
>
> 	drivers/net/ethernet/hisilicon/hns/hns_enet.c:1885 hns_nic_dev_probe()
> 	warn: passing zero to 'PTR_ERR'
>
> drivers/net/ethernet/hisilicon/hns/hns_enet.c
>   1882  
>   1883          priv->ae_node = (void *)of_parse_phandle(node, "ae-handle", 0);
>                                         ^^^^^^^^^^^^^^^^
> I don't think this ever returns ERR_PTRs.
>
>   1884          if (IS_ERR_OR_NULL(priv->ae_node)) {
>   1885                  ret = PTR_ERR(priv->ae_node);
>
>
> This should just be ret = -EINVAL because if priv->ae_node is NULL it
> means we are returning success.
>
>   1886                  dev_err(dev, "not find ae-handle\n");
>   1887                  goto out_read_prop_fail;
>   1888          }
>   1889  
>
>
> regards,
> dan carpenter
>
>



  reply	other threads:[~2016-03-17  6:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 19:48 net: hns: enet specifies a reference to dsaf Dan Carpenter
2016-03-17  6:48 ` Yankejian (Hackim Yim) [this message]
2016-03-17  8:29 ` Dan Carpenter
2016-03-18  1:48 ` Yankejian (Hackim Yim)

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=56EA5357.5020902@huawei.com \
    --to=yankejian@huawei.com \
    --cc=kernel-janitors@vger.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.