aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-03-19 07:46:28 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2010-05-27 19:37:26 -0400
commit9ad285d6db6e04c1c51c79152d2214fffefc92ab (patch)
tree5239b8d95b3a5a6c9254d82db3201d5791167228 /drivers
parentc5617b200ac52e35f7e8cf05a17b0a2d50f6b3e9 (diff)
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')
-rw-r--r--drivers/mfd/t7l66xb.c3
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)
318 struct resource *iomem, *rscr; 318 struct resource *iomem, *rscr;
319 int ret; 319 int ret;
320 320
321 if (pdata == NULL)
322 return -EINVAL;
323
321 iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); 324 iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
322 if (!iomem) 325 if (!iomem)
323 return -EINVAL; 326 return -EINVAL;