aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2015-03-09 13:18:16 -0400
committerBrian Norris <computersforpeace@gmail.com>2015-03-11 18:21:19 -0400
commitdc52499e7f2d9812cfa4aa3b8d84a3f2c97e068b (patch)
tree5ad776455c3216b9818f321aaa8bd8e7530756cd /drivers/mtd/devices
parent98ebb521096f2d90c3e903ba79412cd92064795b (diff)
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: Brian Norris <computersforpeace@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/docg3.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 448ce42f951e..0310f9174dcc 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -2033,7 +2033,7 @@ static int __init docg3_probe(struct platform_device *pdev)
2033 struct mtd_info *mtd; 2033 struct mtd_info *mtd;
2034 struct resource *ress; 2034 struct resource *ress;
2035 void __iomem *base; 2035 void __iomem *base;
2036 int ret, floor, found = 0; 2036 int ret, floor;
2037 struct docg3_cascade *cascade; 2037 struct docg3_cascade *cascade;
2038 2038
2039 ret = -ENXIO; 2039 ret = -ENXIO;
@@ -2073,14 +2073,11 @@ static int __init docg3_probe(struct platform_device *pdev)
2073 0); 2073 0);
2074 if (ret) 2074 if (ret)
2075 goto err_probe; 2075 goto err_probe;
2076 found++;
2077 } 2076 }
2078 2077
2079 ret = doc_register_sysfs(pdev, cascade); 2078 ret = doc_register_sysfs(pdev, cascade);
2080 if (ret) 2079 if (ret)
2081 goto err_probe; 2080 goto err_probe;
2082 if (!found)
2083 goto notfound;
2084 2081
2085 platform_set_drvdata(pdev, cascade); 2082 platform_set_drvdata(pdev, cascade);
2086 doc_dbg_register(cascade->floors[0]->priv); 2083 doc_dbg_register(cascade->floors[0]->priv);