Skip to content

Commit 6da629c

Browse files
Uwe Kleine-Königgregkh
authored andcommitted
tty: vcc: Drop unnecessary if block
If vcc_probe() succeeded dev_set_drvdata() is called with a non-NULL value, and if vcc_probe() failed vcc_remove() isn't called. So there is no way dev_get_drvdata() can return NULL in vcc_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 c24dc4b commit 6da629c

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/tty/vcc.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,9 +681,6 @@ static int vcc_remove(struct vio_dev *vdev)
681681
{
682682
struct vcc_port *port = dev_get_drvdata(&vdev->dev);
683683

684-
if (!port)
685-
return -ENODEV;
686-
687684
del_timer_sync(&port->rx_timer);
688685
del_timer_sync(&port->tx_timer);
689686

0 commit comments

Comments
 (0)