[PATCH] ARM: SAMSUNG: Fix null pointer dereference in ADC driver

Ben Dooks ben-linux at fluff.org
Sun Jan 24 20:35:50 EST 2010


On Fri, Jan 22, 2010 at 11:29:16PM +0100, Maurus Cuelenaere wrote:
> 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.

ok, will apply this to next-samsung tree.
 
> Signed-off-by: Maurus Cuelenaere <mcuelenaere at 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
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.




More information about the linux-arm-kernel mailing list