Skip to content

Commit c24dc4b

Browse files
Uwe Kleine-Königgregkh
authored andcommitted
tty: hvcs: Drop unnecessary if block
If hvcs_probe() succeeded dev_set_drvdata() is called with a non-NULL value, and if hvcs_probe() failed hvcs_remove() isn't called. So there is no way dev_get_drvdata() can return NULL in hvcs_remove() and the check can just go away. Reviewed-by: Jiri Slaby <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9335e23 commit c24dc4b

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/tty/hvc/hvcs.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,9 +825,6 @@ static int hvcs_remove(struct vio_dev *dev)
825825
unsigned long flags;
826826
struct tty_struct *tty;
827827

828-
if (!hvcsd)
829-
return -ENODEV;
830-
831828
/* By this time the vty-server won't be getting any more interrupts */
832829

833830
spin_lock_irqsave(&hvcsd->lock, flags);

0 commit comments

Comments
 (0)