提交 f6b56704 编写于 作者: M Maurus Cuelenaere 提交者: Ben Dooks

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: NMaurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: NBen Dooks <ben-linux@fluff.org>
上级 d8512731
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册