Skip to content

Commit

Permalink
ARM: SAMSUNG: Fix null pointer dereference in ADC driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maurus Cuelenaere authored and Ben Dooks committed Jan 26, 2010
1 parent d851273 commit f6b5670
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/plat-samsung/adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static irqreturn_t s3c_adc_irq(int irq, void *pw)
}

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 */
writel(0, adc->regs + S3C64XX_ADCCLRINT);
}
Expand Down

0 comments on commit f6b5670

Please sign in to comment.