Skip to content

Commit

Permalink
mtd: docg3: drop dead code
Browse files Browse the repository at this point in the history
If no devices were found, we would already have skipped over this code.

Detected by Coverity, CID #744270

Signed-off-by: Brian Norris <[email protected]>
Acked-by: Robert Jarzmik <[email protected]>
  • Loading branch information
computersforpeace committed Mar 11, 2015
1 parent 98ebb52 commit dc52499
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/mtd/devices/docg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit dc52499

Please sign in to comment.