diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2013-06-10 16:43:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-18 01:41:49 +0200 |
commit | f3cbfa5d6e1bbd80b16ea337a2b00a89264c2b45 (patch) | |
tree | 7c0b62d1426ff6d888e26a7bb267227e4e572cef /drivers/misc/sram.c | |
parent | pcmcia: Remove ARCH_CLPS711X dependency (diff) | |
download | linux-f3cbfa5d6e1bbd80b16ea337a2b00a89264c2b45.tar.xz linux-f3cbfa5d6e1bbd80b16ea337a2b00a89264c2b45.zip |
Misc: sram: Remove unneeded check
Patch removes unneeded check for resource since
devm_ioremap_resource do all for us.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/sram.c')
-rw-r--r-- | drivers/misc/sram.c | 6 |
1 files changed, 1 insertions, 5 deletions
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) |