Commit dc52499e authored by Brian Norris's avatar Brian Norris

mtd: docg3: drop dead code

If no devices were found, we would already have skipped over this code.

Detected by Coverity, CID #744270
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
parent 98ebb521
......@@ -2033,7 +2033,7 @@ static int __init docg3_probe(struct platform_device *pdev)
struct mtd_info *mtd;
struct resource *ress;
void __iomem *base;
int ret, floor, found = 0;
int ret, floor;
struct docg3_cascade *cascade;
ret = -ENXIO;
......@@ -2073,14 +2073,11 @@ static int __init docg3_probe(struct platform_device *pdev)
0);
if (ret)
goto err_probe;
found++;
}
ret = doc_register_sysfs(pdev, cascade);
if (ret)
goto err_probe;
if (!found)
goto notfound;
platform_set_drvdata(pdev, cascade);
doc_dbg_register(cascade->floors[0]->priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment