2014-04-04 15:45:06

by Kumar Amit Mehta

[permalink] [raw]
Subject: [PATCH v2] staging: comedi: drivers: pcl812.c: add curly braces for checkpatch

Kernel style is that if one side of the if else statement gets has curly
braces then both side should have them.

Signed-off-by: Kumar Amit Mehta <[email protected]>
---
drivers/staging/comedi/drivers/pcl812.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c
index 160eac8..5cc01fe 100644
--- a/drivers/staging/comedi/drivers/pcl812.c
+++ b/drivers/staging/comedi/drivers/pcl812.c
@@ -811,8 +811,9 @@ static int pcl812_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
devpriv->ai_dma = 0;
break;
}
- } else
+ } else {
devpriv->ai_dma = 0;
+ }

devpriv->ai_act_scan = 0;
devpriv->ai_poll_ptr = 0;
--
1.9.0


2014-04-04 21:29:51

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH v2] staging: comedi: drivers: pcl812.c: add curly braces for checkpatch

On Fri, Apr 04, 2014 at 06:44:44PM +0300, Kumar Amit Mehta wrote:
> Kernel style is that if one side of the if else statement gets has curly
> braces then both side should have them.
>
> Signed-off-by: Kumar Amit Mehta <[email protected]>

Looks good, thanks.

regards,
dan carpenter