[OPW,kernel,2/2] staging: dgnc: braces {} are not necessary for single statement in dgnc_driver.c
diff mbox

Message ID 1382084571-5362-1-git-send-email-archanakumari959@gmail.com
State Rejected
Headers show

Commit Message

Archana kumari Oct. 18, 2013, 8:22 a.m. UTC
Fixes "braces {} are not necessary for single statement blocks" warning
in dgnc_driver.c

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

Comments

Josh Triplett Oct. 18, 2013, 3:45 p.m. UTC | #1
On Fri, Oct 18, 2013 at 01:52:51PM +0530, Archana kumari wrote:
> Fixes "braces {} are not necessary for single statement blocks" warning
> in dgnc_driver.c
> 
> Signed-off-by: Archana kumari <archanakumari959@gmail.com>

Sorry, I replied to patch 1/2 suggesting this without even catching that
patch 2/2 was exactly the change I had in mind. :)

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

> ---
>  drivers/staging/dgnc/dgnc_driver.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
> index f282188..c204266 100644
> --- a/drivers/staging/dgnc/dgnc_driver.c
> +++ b/drivers/staging/dgnc/dgnc_driver.c
> @@ -488,9 +488,8 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
>  	/* get the board structure and prep it */
>  	brd = dgnc_Board[dgnc_NumBoards] =
>  		kzalloc(sizeof(*brd), GFP_KERNEL);
> -	if (!brd) {
> +	if (!brd) 
>  		return -ENOMEM;
> -	}
>  
>  	/* make a temporary message buffer for the boot messages */
>  	brd->msgbuf = brd->msgbuf_head =
> -- 
> 1.8.1.2
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Greg KH Oct. 19, 2013, 9:36 p.m. UTC | #2
On Fri, Oct 18, 2013 at 01:52:51PM +0530, Archana kumari wrote:
> Fixes "braces {} are not necessary for single statement blocks" warning
> in dgnc_driver.c
> 
> Signed-off-by: Archana kumari <archanakumari959@gmail.com>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> ---
>  drivers/staging/dgnc/dgnc_driver.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
> index f282188..c204266 100644
> --- a/drivers/staging/dgnc/dgnc_driver.c
> +++ b/drivers/staging/dgnc/dgnc_driver.c
> @@ -488,9 +488,8 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
>  	/* get the board structure and prep it */
>  	brd = dgnc_Board[dgnc_NumBoards] =
>  		kzalloc(sizeof(*brd), GFP_KERNEL);
> -	if (!brd) {
> +	if (!brd) 

I applied this, but it's incorrect, please always run your patches
through checkpatch when sending them.

Please send a follow-on patch fixing this line up.

thanks,

greg k-h

Patch
diff mbox

diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
index f282188..c204266 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -488,9 +488,8 @@  static int dgnc_found_board(struct pci_dev *pdev, int id)
 	/* get the board structure and prep it */
 	brd = dgnc_Board[dgnc_NumBoards] =
 		kzalloc(sizeof(*brd), GFP_KERNEL);
-	if (!brd) {
+	if (!brd) 
 		return -ENOMEM;
-	}
 
 	/* make a temporary message buffer for the boot messages */
 	brd->msgbuf = brd->msgbuf_head =