* Coverity: rk_gmac_setup(): Error handling issues
@ 2019-11-12 1:34 coverity-bot
0 siblings, 0 replies; only message in thread
From: coverity-bot @ 2019-11-12 1:34 UTC (permalink / raw)
To: Andrew Lunn
Cc: Dan Carpenter, David S. Miller, Gustavo A. R. Silva, linux-next
Hello!
This is an experimental automated report about issues detected by Coverity
from a scan of next-20191108 as part of the linux-next weekly scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan
You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by recent commits:
0c65b2b90d13 ("net: of_get_phy_mode: Change API to solve int/unit warnings")
Coverity reported the following:
*** CID 1487850: Error handling issues (CHECKED_RETURN)
/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c: 1227 in rk_gmac_setup()
1221 int value;
1222
1223 bsp_priv = devm_kzalloc(dev, sizeof(*bsp_priv), GFP_KERNEL);
1224 if (!bsp_priv)
1225 return ERR_PTR(-ENOMEM);
1226
vvv CID 1487850: Error handling issues (CHECKED_RETURN)
vvv Calling "of_get_phy_mode" without checking return value (as is done elsewhere 43 out of 44 times).
1227 of_get_phy_mode(dev->of_node, &bsp_priv->phy_iface);
1228 bsp_priv->ops = ops;
1229
1230 bsp_priv->regulator = devm_regulator_get_optional(dev, "phy");
1231 if (IS_ERR(bsp_priv->regulator)) {
1232 if (PTR_ERR(bsp_priv->regulator) == -EPROBE_DEFER) {
If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1487850 ("Error handling issues")
Fixes: 0c65b2b90d13 ("net: of_get_phy_mode: Change API to solve int/unit warnings")
Thanks for your attention!
--
Coverity-bot
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-11-12 1:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 1:34 Coverity: rk_gmac_setup(): Error handling issues coverity-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).