[PATCH 08/30] mtd: Avoid a pointless kmalloc() return value cast in TQM8xxL mapping handling code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux