staging/rdma/hfi1: diag.c add missing braces
authorIra Weiny <ira.weiny@intel.com>
Wed, 2 Dec 2015 05:43:31 +0000 (00:43 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 21:53:37 +0000 (13:53 -0800)
Else statements should continue using braces even if there is only 1 line in
the block.  Found by checkpatch --strict

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/diag.c

index f687ddf..ed9cfcc 100644 (file)
@@ -954,12 +954,14 @@ static ssize_t hfi1_snoop_read(struct file *fp, char __user *data,
                                ret = -EFAULT;
                        else
                                ret = packet->total_len;
-               } else
+               } else {
                        ret = -EINVAL;
+               }
 
                kfree(packet);
-       } else
+       } else {
                spin_unlock_irqrestore(&dd->hfi1_snoop.snoop_lock, flags);
+       }
 
        return ret;
 }