Re: mfd: dereferencing first then checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan,

On Mon, Mar 08, 2010 at 03:55:22PM +0300, Dan Carpenter wrote:
> drivers/mfd/t7l66xb.c +371 t7l66xb_probe(58) warn: variable dereferenced before check 'pdata'
>    338          t7l66xb->irq_base = pdata->irq_base;
> 
>    [snip]
> 
>    371          if (pdata && pdata->enable)
>    372                  pdata->enable(dev);
> 
> Can pdata be null here?  We dereferenced on line 338 without checking.
We should definitely check for pdata being not NULL here.
I fixed that, thanks for spotting it.

Cheers,
Samuel.


> regards,
> dan carpenter

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux