ARM: SAMSUNG: Fix null pointer dereference in ADC driver

ARM: SAMSUNG: Fix null pointer dereference in ADC driver

Use struct adc_device instead of relying on client (which could be
NULL) when checking for SoC type.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This commit is contained in:
Maurus Cuelenaere 2010-01-22 23:29:16 +01:00 committed by Ben Dooks
parent d85127319c
commit f6b56704f7

View File

@ -295,7 +295,7 @@ static irqreturn_t s3c_adc_irq(int irq, void *pw)
} }
exit: exit:
if (platform_get_device_id(client->pdev)->driver_data == TYPE_S3C64XX) { if (platform_get_device_id(adc->pdev)->driver_data == TYPE_S3C64XX) {
/* Clear ADC interrupt */ /* Clear ADC interrupt */
writel(0, adc->regs + S3C64XX_ADCCLRINT); writel(0, adc->regs + S3C64XX_ADCCLRINT);
} }