[OPW,kernel,1/2] staging: dgnc:Removed unecessary error messages in dgnc_driver.c
diff mbox

Message ID 1382084390-5313-1-git-send-email-archanakumari959@gmail.com
State Accepted
Headers show

Commit Message

Archana kumari Oct. 18, 2013, 8:19 a.m. UTC
Fixed removal of unecessary error messages in staging:dgnc:dgnc_driver.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
---
 drivers/staging/dgnc/dgnc_driver.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Josh Triplett Oct. 18, 2013, 3:44 p.m. UTC | #1
On Fri, Oct 18, 2013 at 01:49:50PM +0530, Archana kumari wrote:
> Fixed removal of unecessary error messages in staging:dgnc:dgnc_driver.c
> 
> Signed-off-by: Archana kumari <archanakumari959@gmail.com>

Nice fix.

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

One additional fix this then allows, though:

> --- a/drivers/staging/dgnc/dgnc_driver.c
> +++ b/drivers/staging/dgnc/dgnc_driver.c
> @@ -489,7 +489,6 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
>  	brd = dgnc_Board[dgnc_NumBoards] =
>  		kzalloc(sizeof(*brd), GFP_KERNEL);
>  	if (!brd) {
> -		APR(("memory allocation for board structure failed\n"));
>  		return -ENOMEM;
>  	}

This if now only has one statement in it, so you can drop the braces.

- Josh Triplett

Patch
diff mbox

diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
index 4271fa3..f282188 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -489,7 +489,6 @@  static int dgnc_found_board(struct pci_dev *pdev, int id)
 	brd = dgnc_Board[dgnc_NumBoards] =
 		kzalloc(sizeof(*brd), GFP_KERNEL);
 	if (!brd) {
-		APR(("memory allocation for board structure failed\n"));
 		return -ENOMEM;
 	}
 
@@ -498,7 +497,6 @@  static int dgnc_found_board(struct pci_dev *pdev, int id)
 		kzalloc(sizeof(u8) * 8192, GFP_KERNEL);
 	if (!brd->msgbuf) {
 		kfree(brd);
-		APR(("memory allocation for board msgbuf failed\n"));
 		return -ENOMEM;
 	}