staging: rts5208: add error handling into rtsx_probe
authorAnton Vasilyev <vasilyev@ispras.ru>
Wed, 13 Jun 2018 17:34:43 +0000 (20:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jun 2018 07:05:13 +0000 (09:05 +0200)
commit70ce2440e20833d1b08222749cba780291a66e30
tree6e162538daeb66490bc77eea87eda8dd40b4069a
parent3a29f43cc3160c3f5cde7b1779fc05ebe68a56e5
staging: rts5208: add error handling into rtsx_probe

If rtsx_probe() fails to allocate dev->chip, then release_everything()
will crash on uninitialized dev->cmnd_ready complete.

Patch adds error handling into rtsx_probe.

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

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rts5208/rtsx.c