Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexander Shiyan and committed by
Greg Kroah-Hartman
f3cbfa5d ea6add0b

+1 -5
+1 -5
drivers/misc/sram.c
··· 45 45 int ret; 46 46 47 47 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 48 - if (!res) 49 - return -EINVAL; 50 - 51 - size = resource_size(res); 52 - 53 48 virt_base = devm_ioremap_resource(&pdev->dev, res); 54 49 if (IS_ERR(virt_base)) 55 50 return PTR_ERR(virt_base); 56 51 52 + size = resource_size(res); 57 53 58 54 sram = devm_kzalloc(&pdev->dev, sizeof(*sram), GFP_KERNEL); 59 55 if (!sram)