mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
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>
This commit is contained in:
parent
ea6add0bf1
commit
f3cbfa5d6e
1 changed files with 1 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue