mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-09 02:51:11 +01: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 <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
1 parent
ea6add0bf1
commit
f3cbfa5d6e
1 file changed
+1
-5
+1
-5
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user