Messages in this thread Patch in this message | | | From | Jesper Juhl <> | Date | Fri, 24 Aug 2007 01:51:44 +0200 | Subject | [PATCH 08/30] mtd: Avoid a pointless kmalloc() return value cast in TQM8xxL mapping handling code |
| |
In drivers/mtd/maps/tqm8xxl.c::init_tqm_mtd() it is pointless casting the return value of kmalloc() since it returns void*.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> --- drivers/mtd/maps/tqm8xxl.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/maps/tqm8xxl.c b/drivers/mtd/maps/tqm8xxl.c index 37e4ded..1d75ce4 100644 --- a/drivers/mtd/maps/tqm8xxl.c +++ b/drivers/mtd/maps/tqm8xxl.c @@ -141,8 +141,7 @@ int __init init_tqm_mtd(void) goto error_mem; } - map_banks[idx]->name = (char *)kmalloc(16, GFP_KERNEL); - + map_banks[idx]->name = kmalloc(16, GFP_KERNEL); if (!map_banks[idx]->name) { ret = -ENOMEM; /* FIXME: What if some MTD devices were probed already? */ -- 1.5.2.2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |