From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] phy: ti: introduce phy-gmii-sel driver
Date: Fri, 14 Dec 2018 09:55:45 +0000 [thread overview]
Message-ID: <20181214094117.GA12567@kadam> (raw)
Hello Grygorii Strashko,
This is a semi-automatic email about new static checker warnings.
The patch 92b58b34741f: "phy: ti: introduce phy-gmii-sel driver" from
Nov 25, 2018, leads to the following Smatch complaint:
drivers/phy/ti/phy-gmii-sel.c:210 phy_gmii_sel_of_xlate()
warn: variable dereferenced before check 'priv' (see line 207)
drivers/phy/ti/phy-gmii-sel.c
206 return ERR_PTR(-EINVAL);
207 if (priv->soc_data->features & BIT(PHY_GMII_SEL_RMII_IO_CLK_EN) &&
^^^^^^^^^^^^^^
dereference
208 args->args_count < 2)
209 return ERR_PTR(-EINVAL);
210 if (!priv || !priv->if_phys)
^^^^^
Too late. Can priv even be NULL? Should this condition be removed?
211 return ERR_PTR(-ENODEV);
212 if (phy_id > priv->soc_data->num_ports)
regards,
dan carpenter
reply other threads:[~2018-12-14 9:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20181214094117.GA12567@kadam \
--to=dan.carpenter@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox