[PATCH] mtd: remove redundant/dead code from physmap_of.c
Mariusz Kozlowski
m.kozlowski at tuxland.pl
Fri Jul 27 11:29:32 EDT 2007
Hello,
This patch removes redundant memset() and dead return line from
of_physmap_probe(). No functional change.
Signed-off-by: Mariusz Kozlowski <m.kozlowski at tuxland.pl>
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",
More information about the linux-mtd
mailing list