From: mcuelenaere@gmail.com (Maurus Cuelenaere)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: SAMSUNG: Fix null pointer dereference in ADC driver
Date: Fri, 22 Jan 2010 23:29:16 +0100 [thread overview]
Message-ID: <b2e8f9f71001221429l5ea24cd8j3046e7a24546320a@mail.gmail.com> (raw)
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
next reply other threads:[~2010-01-22 22:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-22 22:29 Maurus Cuelenaere [this message]
2010-01-25 1:35 ` [PATCH] ARM: SAMSUNG: Fix null pointer dereference in ADC driver Ben Dooks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2e8f9f71001221429l5ea24cd8j3046e7a24546320a@mail.gmail.com \
--to=mcuelenaere@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).