linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: SAMSUNG: Fix null pointer dereference in ADC driver
@ 2010-01-22 22:29 Maurus Cuelenaere
  2010-01-25  1:35 ` Ben Dooks
  0 siblings, 1 reply; 2+ messages in thread
From: Maurus Cuelenaere @ 2010-01-22 22:29 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 arch/arm/plat-samsung/adc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index 120b790..c7659b7 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -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);
 	}
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-25  1:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-22 22:29 [PATCH] ARM: SAMSUNG: Fix null pointer dereference in ADC driver Maurus Cuelenaere
2010-01-25  1:35 ` Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).