linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video:uvesafb: reduce the double check
@ 2012-08-15  9:33 Wang YanQing
  0 siblings, 0 replies; only message in thread
From: Wang YanQing @ 2012-08-15  9:33 UTC (permalink / raw)
  To: FlorianSchandinat; +Cc: linux-fbdev, linux-kernel, spock


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.

Signed-off-by: Wang YanQing <udknight@gmail.com>
---
 drivers/video/uvesafb.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 2f8f82d..b064a3e 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -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);
-- 
1.7.11.1.116.g8228a23

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-08-15  9:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-15  9:33 [PATCH] video:uvesafb: reduce the double check Wang YanQing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).