瀏覽代碼

staging/xgifb: Consolidate return paths

Both branches of this if statement end in the same return statement.
-> move the return to the bottom and get rid of the else statement.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Huewe 13 年之前
父節點
當前提交
053004b375
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      drivers/staging/xgifb/vb_setmode.c

+ 1 - 3
drivers/staging/xgifb/vb_setmode.c

@@ -2860,10 +2860,8 @@ static unsigned short XGI_GetOffset(unsigned short ModeNo,
 		temp = 0x6B;
 		if (infoflag & InterlaceMode)
 			temp = temp << 1;
-		return temp * colordepth;
-	} else {
-		return temp * colordepth;
 	}
+	return temp * colordepth;
 }
 
 static void XGI_SetCRT2Offset(unsigned short ModeNo,