Message ID | 20200805124840.6893-1-novikov@ispras.ru (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Jiri Kosina |
Headers | show |
Series | HID: u2fzero: handle errors of u2fzero_fill_in_urb() in probe | expand |
diff --git a/drivers/hid/hid-u2fzero.c b/drivers/hid/hid-u2fzero.c index 95e0807878c7..0632f6c3aa66 100644 --- a/drivers/hid/hid-u2fzero.c +++ b/drivers/hid/hid-u2fzero.c @@ -315,7 +315,11 @@ static int u2fzero_probe(struct hid_device *hdev, if (ret) return ret; - u2fzero_fill_in_urb(dev); + ret = u2fzero_fill_in_urb(dev); + if (ret) { + hid_hw_stop(hdev); + return ret; + } dev->present = true;
u2fzero_probe() does not handle errors of u2fzero_fill_in_urb(). The patch fixes that. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov <novikov@ispras.ru> --- drivers/hid/hid-u2fzero.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)