瀏覽代碼

staging: vt6655: Fixed else after return or break warning.

This patch fixes multiple instances of checkpatch.pl
WARNING : else is not generally useful after a break or return in
device_main.c

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu 11 年之前
父節點
當前提交
b7f0790d73
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      drivers/staging/vt6655/device_main.c

+ 2 - 4
drivers/staging/vt6655/device_main.c

@@ -2915,9 +2915,8 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 		if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) {
 		if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) {
 			rc = -EFAULT;
 			rc = -EFAULT;
 			break;
 			break;
-		} else {
-			rc = 0;
 		}
 		}
+		rc = 0;
 		pReq = (PSCmdRequest)rq;
 		pReq = (PSCmdRequest)rq;
 		pReq->wResult = MAGIC_CODE;
 		pReq->wResult = MAGIC_CODE;
 		break;
 		break;
@@ -2934,9 +2933,8 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 			{
 			{
 				rc = -EFAULT;
 				rc = -EFAULT;
 				break;
 				break;
-			} else {
-				rc = 0;
 			}
 			}
+			rc = 0;
 
 
 		if (test_and_set_bit(0, (void *)&(pMgmt->uCmdBusy)))
 		if (test_and_set_bit(0, (void *)&(pMgmt->uCmdBusy)))
 			return -EBUSY;
 			return -EBUSY;