[PATCH v2 4/6] staging: dgnc: removes kzalloc error messages
Lidza Louina
lidza.louina at gmail.com
Fri Sep 6 20:48:30 UTC 2013
This patch removes the error messages associated
with errors in kzalloc. The driver doesn't need to
add the error message because kzalloc already prints
a more useful message.
Signed-off-by: Lidza Louina <lidza.louina at gmail.com>
---
drivers/staging/dgnc/dgnc_driver.c | 2 --
drivers/staging/dgnc/dgnc_tty.c | 4 ----
2 files changed, 6 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
index 3717d86..6bc944d 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -501,7 +501,6 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
brd = dgnc_Board[dgnc_NumBoards] =
kzalloc(sizeof(struct dgnc_board), GFP_KERNEL);
if (!brd) {
- APR(("memory allocation for board structure failed\n"));
return -ENOMEM;
}
@@ -510,7 +509,6 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
kzalloc(sizeof(char) * 8192, GFP_KERNEL);
if (!brd->msgbuf) {
kfree(brd);
- APR(("memory allocation for board msgbuf failed\n"));
return -ENOMEM;
}
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index a0af01d..1f2d611 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -372,10 +372,6 @@ int dgnc_tty_init(struct dgnc_board *brd)
* interrupt context, and there are no locks held.
*/
brd->channels[i] = kzalloc(sizeof(struct channel_t), GFP_KERNEL);
- if (!brd->channels[i]) {
- DPR_CORE(("%s:%d Unable to allocate memory for channel struct\n",
- __FILE__, __LINE__));
- }
}
}
--
1.8.1.2
More information about the devel
mailing list