[PATCH] mtd: remove redundant/dead code from physmap_of.c

From: Mariusz Kozlowski
Date: Fri Jul 27 2007 - 11:29:46 EST


Hello,

This patch removes redundant memset() and dead return line from
of_physmap_probe(). No functional change.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>

drivers/mtd/maps/physmap_of.c | 6223 -> 6176 (-47 bytes)

drivers/mtd/maps/physmap_of.c | 5 -----
1 file changed, 5 deletions(-)

--- linux-2.6.23-rc1-mm1-a/drivers/mtd/maps/physmap_of.c 2007-07-26 13:07:41.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/mtd/maps/physmap_of.c 2007-07-27 17:06:15.000000000 +0200
@@ -139,11 +139,10 @@ static int __devinit of_physmap_probe(st
info = kzalloc(sizeof(struct physmap_flash_info), GFP_KERNEL);
if (info == NULL) {
err = -ENOMEM;
goto err_out;
}
- memset(info, 0, sizeof(*info));

dev_set_drvdata(&dev->dev, info);

info->res = request_mem_region(res.start, res.end - res.start + 1,
dev->dev.bus_id);
@@ -211,14 +210,10 @@ static int __devinit of_physmap_probe(st
return 0;

err_out:
of_physmap_remove(dev);
return err;
-
- return 0;
-
-
}

static struct of_device_id of_physmap_match[] = {
{
.type = "rom",
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/