From f3cbfa5d6e1bbd80b16ea337a2b00a89264c2b45 Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Mon, 10 Jun 2013 18:43:53 +0400 Subject: Misc: sram: Remove unneeded check Patch removes unneeded check for resource since devm_ioremap_resource do all for us. Signed-off-by: Alexander Shiyan Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/misc/sram.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers/misc') diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 4a938860fec0..d87cc91bc016 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c @@ -45,15 +45,11 @@ static int sram_probe(struct platform_device *pdev) int ret; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -EINVAL; - - size = resource_size(res); - virt_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(virt_base)) return PTR_ERR(virt_base); + size = resource_size(res); sram = devm_kzalloc(&pdev->dev, sizeof(*sram), GFP_KERNEL); if (!sram) -- cgit v1.2.3