On Wed, Feb 26, 2014 at 06:44:34PM -0300, Fabio Estevam wrote: > From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> > > Fix the following static checker warning: > > drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c:164 ipu_dmfc_setup_channel() warn: variable dereferenced before check 'dmfc' (see line 157) > > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> > --- > drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c > index 98070dd..76542d3 100644 > --- a/drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c > +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c > @@ -157,13 +157,13 @@ static int ipu_dmfc_setup_channel(struct dmfc_channel *dmfc, int slots, > struct ipu_dmfc_priv *priv = dmfc->priv; ^^^^^^^^^^ There is another dereference here still... > u32 val, field; > > + if (!dmfc) > + return -EINVAL; > + regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel