aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/xgifb
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2016-09-18 14:35:59 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-18 12:37:43 +0200
commit56487aed9597569f5db716c86f9bc93aea1bd3b6 (patch)
tree91393fe4e352a8c156b68ad5b096dc8853bc0b77 /drivers/staging/xgifb
parentstaging: xgifb: Replace explicit NULL comparison (diff)
downloadlinux-dev-56487aed9597569f5db716c86f9bc93aea1bd3b6.tar.xz
linux-dev-56487aed9597569f5db716c86f9bc93aea1bd3b6.zip
Staging: xgifb: Compress return logic
This patch compresses the return logic into a single statement and removes the now unused return variable. Done using coccinelle: @@ type T; identifier r; @@ - T r; ... when !=r - r = + return ...; - return r; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xgifb')
-rw-r--r--drivers/staging/xgifb/XGI_main_26.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 23a3bd70268c..a58983f3d402 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -62,7 +62,6 @@ static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr,
unsigned short ModeNo = modeno;
unsigned short ModeIdIndex = 0, ClockIndex = 0;
unsigned short RefreshRateTableIndex = 0;
- int Clock;
InitTo330Pointer(HwDeviceExtension->jChipType, XGI_Pr);
@@ -73,9 +72,7 @@ static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr,
ClockIndex = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
- Clock = XGI_VCLKData[ClockIndex].CLOCK * 1000;
-
- return Clock;
+ return XGI_VCLKData[ClockIndex].CLOCK * 1000;
}
static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,