From 924fd92cf1b31e490362f6ea28d4565f3f9aefa7 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Tue, 21 May 2013 02:14:34 +0900 Subject: [PATCH] Revert "ARM: SAMSUNG: don't check resource with devm_ioremap_resource" This reverts commit 1b02b99b1a19835f3f7120ed9fa86ee4db48a242. --- arch/arm/plat-samsung/adc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index 79690f2f6d3f..ca07cb1b155a 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c @@ -381,6 +381,11 @@ static int s3c_adc_probe(struct platform_device *pdev) } regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!regs) { + dev_err(dev, "failed to find registers\n"); + return -ENXIO; + } + adc->regs = devm_ioremap_resource(dev, regs); if (IS_ERR(adc->regs)) return PTR_ERR(adc->regs); -- 2.39.5