Skip to content

Commit 8f0ba63

Browse files
Wei YongjunMartin Schwidefsky
authored andcommitted
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 <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent 15c03dd commit 8f0ba63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/s390/char/tty3270.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ static void tty3270_resize_work(struct work_struct *work)
810810
struct winsize ws;
811811

812812
screen = tty3270_alloc_screen(tp->n_rows, tp->n_cols);
813-
if (!screen)
813+
if (IS_ERR(screen))
814814
return;
815815
/* Switch to new output size */
816816
spin_lock_bh(&tp->view.lock);

0 commit comments

Comments
 (0)