Skip to contentSkip to conversation

video:uvesafb: reduce the double check

PATCH New Wang YanQing 1 participant 1 message Aug 15, 2012 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video:uvesafb: reduce the double check

uvesafb_open had checked the par->vbe_state_size, so we don't need to check it again in uvesafb_vbe_state_save, this patch just can reduce a few lines of code.

---
 drivers/video/uvesafb.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/video/uvesafb.c +0 -3
index 2f8f82d..b064a3e 100644
@@ -357,9 +357,6 @@ static u8 *uvesafb_vbe_state_save(struct uvesafb_par *par)
 	u8 *state;
 	int err;
 
-	if (!par->vbe_state_size)
-		return NULL;
-
 	state = kmalloc(par->vbe_state_size, GFP_KERNEL);
 	if (!state)
 		return ERR_PTR(-ENOMEM);
Signature · 1 line
1.7.11.1.116.g8228a23