]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/misc/sram.c
Merge branch 'overlayfs-af_unix-fix' into overlayfs-linus
[karo-tx-linux.git] / drivers / misc / sram.c
index 69cdabea9c03de62adc593c1b33a6d7f32543e4d..f84b53d6ce506e15b89b1e314e2c4f478e7f7f3e 100644 (file)
@@ -364,8 +364,8 @@ static int sram_probe(struct platform_device *pdev)
                sram->virt_base = devm_ioremap(sram->dev, res->start, size);
        else
                sram->virt_base = devm_ioremap_wc(sram->dev, res->start, size);
-       if (IS_ERR(sram->virt_base))
-               return PTR_ERR(sram->virt_base);
+       if (!sram->virt_base)
+               return -ENOMEM;
 
        sram->pool = devm_gen_pool_create(sram->dev, ilog2(SRAM_GRANULARITY),
                                          NUMA_NO_NODE, NULL);