[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1381939056-27898-1-git-send-email-geyslan@gmail.com>
Date: Wed, 16 Oct 2013 12:57:35 -0300
From: "Geyslan G. Bem" <geyslan@...il.com>
To: lidza.louina@...il.com
Cc: gregkh@...uxfoundation.org, driverdev-devel@...uxdriverproject.org,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
kernel-br@...glegroups.com, "Geyslan G. Bem" <geyslan@...il.com>
Subject: [PATCH] drivers: staging: dgnc: Remove useless casting in dgnc_driver.c
Casting (void *) value returned by kzalloc is useless
as mentioned in Documentation/CodingStyle, Chap 14.
Signed-off-by: Geyslan G. Bem <geyslan@...il.com>
---
drivers/staging/dgnc/dgnc_driver.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
index 71d2b83..7f31ab5 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -498,16 +498,14 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
unsigned long flags;
/* get the board structure and prep it */
- brd = dgnc_Board[dgnc_NumBoards] =
- (struct board_t *) kzalloc(sizeof(struct board_t), GFP_KERNEL);
+ brd = dgnc_Board[dgnc_NumBoards] = kzalloc(sizeof(struct board_t), GFP_KERNEL);
if (!brd) {
APR(("memory allocation for board structure failed\n"));
return(-ENOMEM);
}
/* make a temporary message buffer for the boot messages */
- brd->msgbuf = brd->msgbuf_head =
- (char *) kzalloc(sizeof(char) * 8192, GFP_KERNEL);
+ brd->msgbuf = brd->msgbuf_head = kzalloc(sizeof(char) * 8192, GFP_KERNEL);
if (!brd->msgbuf) {
kfree(brd);
APR(("memory allocation for board msgbuf failed\n"));
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists