diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 4bd48f79b94bd0bc9f2e8a409dfecf308f0e59b2..1262368443f45d68efc50412079678f0751f3d3f 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2129,7 +2129,7 @@ static int tty_open(struct inode *inode, struct file *filp)
 		/*
 		 * Need to reset f_op in case a hangup happened.
 		 */
-		if (filp->f_op == &hung_up_tty_fops)
+		if (tty_hung_up_p(filp))
 			filp->f_op = &tty_fops;
 		goto retry_open;
 	}