Skip to contentSkip to conversation

video: fbdev: atyfb: Remove assigned but never used variable statements

PATCH New Colin King 1 participant 1 message Sep 10, 2021

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 video: fbdev: atyfb: Remove assigned but never used variable statements

From: Colin Ian King <[email protected]>

There are a couple of statements where local variables are being assigned values that are never read because the function returns immediately after the assignment. Clean up the code by removing them.

Addresses-Coverity: ("Unused value")

---
 drivers/video/fbdev/aty/mach64_gx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/video/fbdev/aty/mach64_gx.c +0 -2
index 9c37e28fb78b..d06d24830080 100644
@@ -352,10 +352,8 @@ static int aty_var_to_pll_18818(const struct fb_info *info, u32 vclk_per,
 	post_divider = 1;
 
 	if (MHz100 > MAX_FREQ_2595) {
-		MHz100 = MAX_FREQ_2595;
 		return -EINVAL;
 	} else if (MHz100 < ABS_MIN_FREQ_2595) {
-		program_bits = 0;	/* MHz100 = 257 */
 		return -EINVAL;
 	} else {
 		while (MHz100 < MIN_FREQ_2595) {
Signature · 1 line
2.32.0