public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [bug report] phy: ti: introduce phy-gmii-sel driver
@ 2018-12-14  9:55 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2018-12-14  9:55 UTC (permalink / raw)
  To: kernel-janitors

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-14  9:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-14  9:55 [bug report] phy: ti: introduce phy-gmii-sel driver Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox