via-ircc: don't return zero if via_ircc_open() failed
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 16 Aug 2013 20:48:14 +0000 (23:48 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Aug 2013 20:27:28 +0000 (13:27 -0700)
If via_ircc_open() fails, data structures of the driver left uninitialized,
but probe (via_init_one()) returns zero. That can lead to null pointer dereference
in via_remove_one(), since it does not check drvdata for NULL.

The patch implements proper error code propagation.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found