diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-02 07:52:26 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-02 07:56:55 -0500 |
commit | b5603a943d11cd4c74e90fdd68296ffdc8f6749c (patch) | |
tree | 42fe2f2a74cb2623a2f80fb5aad083ee662b2674 /drivers/media/usb/cx231xx | |
parent | 5eeb3014827f44ea7de43c865118cb2095ad030e (diff) |
[media] cx231xx: don't use dev it not allocated
changeset 5eeb3014827f added a fixup at the error check
code. However, it introduced a new error:
drivers/media/usb/cx231xx/cx231xx-cards.c:1586 cx231xx_usb_probe() error: we previously assumed 'dev' could be null (see line 1430)
This happens when dev = kmalloc() fails. So, instead of relying
on it to succeed, just change the parameter of clear_bit() from
'dev->devno' to 'nr'.
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/cx231xx')
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-cards.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c index 33c2fa2e7596..da03733690bd 100644 --- a/drivers/media/usb/cx231xx/cx231xx-cards.c +++ b/drivers/media/usb/cx231xx/cx231xx-cards.c | |||
@@ -1583,7 +1583,7 @@ err_v4l2: | |||
1583 | usb_set_intfdata(interface, NULL); | 1583 | usb_set_intfdata(interface, NULL); |
1584 | err_if: | 1584 | err_if: |
1585 | usb_put_dev(udev); | 1585 | usb_put_dev(udev); |
1586 | clear_bit(dev->devno, &cx231xx_devused); | 1586 | clear_bit(nr, &cx231xx_devused); |
1587 | return retval; | 1587 | return retval; |
1588 | } | 1588 | } |
1589 | 1589 | ||