Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6b56704 authored by Maurus Cuelenaere's avatar Maurus Cuelenaere Committed by Ben Dooks
Browse files

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: default avatarMaurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent d8512731
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}