diff options
author | Lee Jones <lee.jones@linaro.org> | 2012-05-17 09:45:20 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-05-20 11:27:11 -0400 |
commit | 6dff11e5ab2f752ad75d0b506fcc981fef9999c5 (patch) | |
tree | 61d8891cb61143a8b99399cacb724e2d5cb86ae7 /drivers/mfd | |
parent | 5a8fea031ed5462b63877e0f6d29e0fc0fb82f14 (diff) |
mfd: Prevent unassigned pointer from being used in ab8500-gpadc driver
Before this patch if probe failed to find the platform IRQ it
would attempt to print a message out using dev_err, which in
turn was being passed an unassigned pointer. This patch
ensures the information passed to dev_err is correct.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/ab8500-gpadc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c index c39fc716e1dc..c1656ab34c34 100644 --- a/drivers/mfd/ab8500-gpadc.c +++ b/drivers/mfd/ab8500-gpadc.c | |||
@@ -584,7 +584,7 @@ static int __devinit ab8500_gpadc_probe(struct platform_device *pdev) | |||
584 | 584 | ||
585 | gpadc->irq = platform_get_irq_byname(pdev, "SW_CONV_END"); | 585 | gpadc->irq = platform_get_irq_byname(pdev, "SW_CONV_END"); |
586 | if (gpadc->irq < 0) { | 586 | if (gpadc->irq < 0) { |
587 | dev_err(gpadc->dev, "failed to get platform irq-%d\n", | 587 | dev_err(&pdev->dev, "failed to get platform irq-%d\n", |
588 | gpadc->irq); | 588 | gpadc->irq); |
589 | ret = gpadc->irq; | 589 | ret = gpadc->irq; |
590 | goto fail; | 590 | goto fail; |