From: Wei Yongjun Date: Tue, 10 Sep 2013 22:49:20 +0000 (+0800) Subject: s390/3270: fix return value check in tty3270_resize_work() X-Git-Tag: v3.12-rc5~28^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f0ba630af45235a6866054704531d49e524e49a;p=profile%2Fivi%2Fkernel-x86-ivi.git s390/3270: fix return value check in tty3270_resize_work() In case of error, the function tty3270_alloc_screen() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index a0f47c8..3f4ca4e 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c @@ -810,7 +810,7 @@ static void tty3270_resize_work(struct work_struct *work) struct winsize ws; screen = tty3270_alloc_screen(tp->n_rows, tp->n_cols); - if (!screen) + if (IS_ERR(screen)) return; /* Switch to new output size */ spin_lock_bh(&tp->view.lock);