From patchwork Thu Jan 9 15:07:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 231582 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=DATE_IN_PAST_96_XX, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93D0EC2BA83 for ; Thu, 13 Feb 2020 15:03:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5E74924676 for ; Thu, 13 Feb 2020 15:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581606206; bh=LBjV41QVTbhBSXZYt4w3lD7OaMH8sl/c9aJdsfjs44M=; h=From:Date:Subject:To:Cc:Reply-to:List-ID:From; b=wC94HWD9q95JQUAmrP3LMeRPb75/+sgr7u3is0aQD8h2tlaAYYwi2tOHA46duVYOd Ky2hJX6ekSLIEPYSfUaFAqfYhAGY+PzzvYp9MfGGaWyumjeHP3oSKB/NKg3DmQ25Y8 yO+QLiP3NZyLBP4Mmb5S+4gSl4FkZUPUwjxzIrRI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727163AbgBMPD0 (ORCPT ); Thu, 13 Feb 2020 10:03:26 -0500 Received: from www.linuxtv.org ([130.149.80.248]:58394 "EHLO www.linuxtv.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbgBMPDZ (ORCPT ); Thu, 13 Feb 2020 10:03:25 -0500 Received: from mchehab by www.linuxtv.org with local (Exim 4.92) (envelope-from ) id 1j2Fzz-00DQaf-Vn; Thu, 13 Feb 2020 15:01:51 +0000 From: Mauro Carvalho Chehab Date: Thu, 09 Jan 2020 15:07:04 +0000 Subject: [git:media_tree/fixes] media: iguanair: fix endpoint sanity check To: linuxtv-commits@linuxtv.org Cc: Sean Young , Oliver Neukum , stable , Johan Hovold Mail-followup-to: linux-media@vger.kernel.org Forward-to: linux-media@vger.kernel.org Reply-to: linux-media@vger.kernel.org Message-Id: Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is an automatic generated email to let you know that the following patch were queued: Subject: media: iguanair: fix endpoint sanity check Author: Johan Hovold Date: Fri Jan 3 17:35:13 2020 +0100 Make sure to use the current alternate setting, which need not be the first one by index, when verifying the endpoint descriptors and initialising the URBs. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 26ff63137c45 ("[media] Add support for the IguanaWorks USB IR Transceiver") Fixes: ab1cbdf159be ("media: iguanair: add sanity checks") Cc: stable # 3.6 Cc: Oliver Neukum Signed-off-by: Johan Hovold Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/iguanair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index 872d6441e512..a7deca1fefb7 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -413,7 +413,7 @@ static int iguanair_probe(struct usb_interface *intf, int ret, pipein, pipeout; struct usb_host_interface *idesc; - idesc = intf->altsetting; + idesc = intf->cur_altsetting; if (idesc->desc.bNumEndpoints < 2) return -ENODEV;