Skip to contentSkip to conversation

staging: comedi: Removed not necessary braces for single block

PATCH In review Jitendra Khasdev 2 participants 2 messages Jan 15, 2019 – Jan 16, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: comedi: Removed not necessary braces for single block

This patch is used to remove not necessary braces for single if block.

---
 drivers/staging/comedi/comedi_fops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/comedi/comedi_fops.c +2 -2
index 5d2fcbfe02af..38980fad8be4 100644
@@ -1605,9 +1605,9 @@ static int do_insn_ioctl(struct comedi_device *dev,
 	unsigned int n_data = MIN_SAMPLES;
 	int ret = 0;
 
-	if (copy_from_user(&insn, arg, sizeof(insn))) {
+	if (copy_from_user(&insn, arg, sizeof(insn)))
 		return -EFAULT;
-	}
+
 
 	n_data = max(n_data, insn.n);
 
Signature · 1 line
2.13.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Jitendra Khasdev

This patch is used to remove not necessary braces for single if block.

---
  drivers/staging/comedi/comedi_fops.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/comedi/comedi_fops.c +0 -0
index 5d2fcbfe02af..38980fad8be4 100644
@@ -1605,9 +1605,9 @@ static int do_insn_ioctl(struct comedi_device *dev,
  	unsigned int n_data = MIN_SAMPLES;

drivers/staging/comedi/comedi_fops.c static int do_insn_ioctl(struct comedi_device *dev, · line 1613

Quoted 10 lines
drivers/staging/comedi/comedi_fops.c +2 -2
  	int ret = 0;
 
-	if (copy_from_user(&insn, arg, sizeof(insn))) {
+	if (copy_from_user(&insn, arg, sizeof(insn)))
  		return -EFAULT;
-	}
+
 
  	n_data = max(n_data, insn.n);
 

The patch looks fine. Thanks for the fix!

Signature · 4 lines
-=( Ian Abbott <[email protected]> || Web: www.mev.co.uk )=-
-=( MEV Ltd. is a company registered in England & Wales. )=-
-=( Registered number: 02862268.  Registered address:    )=-
-=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-