From: Laurent Pinchart Date: Thu, 10 Dec 2009 01:31:21 +0000 (-0300) Subject: V4L/DVB (13826): uvcvideo: Fix controls blacklisting X-Git-Tag: firefly_0821_release~11625^2~196 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=da0297498ee0e4a73ac74beae564dc72abbe6f48;p=firefly-linux-kernel-4.4.55.git V4L/DVB (13826): uvcvideo: Fix controls blacklisting commit 385097e08b9c24655626ed760bc67eb7e50115a0 upstream. The control blacklisting code erroneously used usb_match_id() by passing a pointer to a usb_device_id structure instead of an array of such structures. Replace the usb_match_id() call by usb_match_id_one(). Thanks to Paulo Assis for diagnosing the bug and providing an initial fix. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index 1b89735e62fd..4a293b444459 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c @@ -1405,7 +1405,7 @@ uvc_ctrl_prune_entity(struct uvc_device *dev, struct uvc_entity *entity) size = entity->processing.bControlSize; for (i = 0; i < ARRAY_SIZE(blacklist); ++i) { - if (!usb_match_id(dev->intf, &blacklist[i].id)) + if (!usb_match_one_id(dev->intf, &blacklist[i].id)) continue; if (blacklist[i].index >= 8 * size ||