diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-03-19 12:46:28 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-05-28 01:37:26 +0200 |
commit | 9ad285d6db6e04c1c51c79152d2214fffefc92ab (patch) | |
tree | 5239b8d95b3a5a6c9254d82db3201d5791167228 /drivers/mfd | |
parent | c5617b200ac52e35f7e8cf05a17b0a2d50f6b3e9 (diff) | |
download | linux-stable-9ad285d6db6e04c1c51c79152d2214fffefc92ab.tar.gz linux-stable-9ad285d6db6e04c1c51c79152d2214fffefc92ab.tar.bz2 linux-stable-9ad285d6db6e04c1c51c79152d2214fffefc92ab.zip |
mfd: Check t7l66 platform_data pointer
We should check for pdata being not NULL before dereferencing it.
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/t7l66xb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c index da6383a934ac..5041d33adf0b 100644 --- a/drivers/mfd/t7l66xb.c +++ b/drivers/mfd/t7l66xb.c @@ -318,6 +318,9 @@ static int t7l66xb_probe(struct platform_device *dev) struct resource *iomem, *rscr; int ret; + if (pdata == NULL) + return -EINVAL; + iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); if (!iomem) return -EINVAL; |