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 | |
parent | c5617b200ac52e35f7e8cf05a17b0a2d50f6b3e9 (diff) | |
download | kernel_samsung_crespo-9ad285d6db6e04c1c51c79152d2214fffefc92ab.zip kernel_samsung_crespo-9ad285d6db6e04c1c51c79152d2214fffefc92ab.tar.gz kernel_samsung_crespo-9ad285d6db6e04c1c51c79152d2214fffefc92ab.tar.bz2 |
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>
-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 da6383a..5041d33 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; |