Commit f3cbfa5d authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Greg Kroah-Hartman

Misc: sram: Remove unneeded check

Patch removes unneeded check for resource since
devm_ioremap_resource do all for us.
Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ea6add0b
...@@ -45,15 +45,11 @@ static int sram_probe(struct platform_device *pdev) ...@@ -45,15 +45,11 @@ static int sram_probe(struct platform_device *pdev)
int ret; int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -EINVAL;
size = resource_size(res);
virt_base = devm_ioremap_resource(&pdev->dev, res); virt_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(virt_base)) if (IS_ERR(virt_base))
return PTR_ERR(virt_base); return PTR_ERR(virt_base);
size = resource_size(res);
sram = devm_kzalloc(&pdev->dev, sizeof(*sram), GFP_KERNEL); sram = devm_kzalloc(&pdev->dev, sizeof(*sram), GFP_KERNEL);
if (!sram) if (!sram)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment