Commit fdaca631 authored by Daniil Dulov's avatar Daniil Dulov Committed by Hans Verkuil

media: usb: Check az6007_read() return value

If az6007_read() returns error, there is no sence to continue.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 3af2f4f1 ("[media] az6007: Change the az6007 read/write routine parameter")
Signed-off-by: default avatarDaniil Dulov <d.dulov@aladdin.ru>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent b8ed1ceb
......@@ -202,7 +202,8 @@ static int az6007_rc_query(struct dvb_usb_device *d)
unsigned code;
enum rc_proto proto;
az6007_read(d, AZ6007_READ_IR, 0, 0, st->data, 10);
if (az6007_read(d, AZ6007_READ_IR, 0, 0, st->data, 10) < 0)
return -EIO;
if (st->data[1] == 0x44)
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment