lkml.org 
[lkml]   [2007]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 07/30] mtd: Get rid of pointless cast of kzalloc() return value in AT26xxx driver
kzalloc() returns a void pointer - no need to cast it in
drivers/mtd/devices/at91_dataflash26.c::add_dataflash()

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
drivers/mtd/devices/at91_dataflash26.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/devices/at91_dataflash26.c b/drivers/mtd/devices/at91_dataflash26.c
index 64ce37f..9c4aac4 100644
--- a/drivers/mtd/devices/at91_dataflash26.c
+++ b/drivers/mtd/devices/at91_dataflash26.c
@@ -360,8 +360,7 @@ static int __init add_dataflash(int channel, char *name, int nr_pages,
device->read = at91_dataflash26_read;
device->write = at91_dataflash26_write;

- priv = (struct dataflash_local *)kzalloc(sizeof(struct dataflash_local),
- GFP_KERNEL);
+ priv = kzalloc(sizeof(struct dataflash_local), GFP_KERNEL);
if (!priv) {
kfree(device);
return -ENOMEM;
--
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/

\
 
 \ /
  Last update: 2007-08-24 01:57    [W:0.194 / U:2.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site