Simplify return logic to avoid unnecessary variable assignments.
Coccinelle was used with this semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
}
if (pVBInfo->TVInfo & TVSetYPbPr750p) {
- tempal = XGI_YPbPr750pVCLK;
- return tempal;
+ return XGI_YPbPr750pVCLK;
}
if (pVBInfo->TVInfo & TVSetYPbPr525p) {
- tempal = YPbPr525pVCLK;
- return tempal;
+ return YPbPr525pVCLK;
}
tempal = NTSC1024VCLK;
} /* {End of VB} */
inb((pVBInfo->P3ca + 0x02));
- tempal = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
- return tempal;
+ return XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
}
static void XGI_GetVCLKLen(unsigned char tempal, unsigned char *di_0,