Message ID | 20190322154425.3852517-16-arnd@arndb.de |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp962138jan; Fri, 22 Mar 2019 08:47:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwiopWSNgsrR1XITD/j+na0MXxWRDgZGRQUBlUKDwGUbhJMzKSKQWWbiMIBOwPI74oDU+D X-Received: by 2002:a62:204b:: with SMTP id g72mr6460152pfg.51.1553269679054; Fri, 22 Mar 2019 08:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269679; cv=none; d=google.com; s=arc-20160816; b=xuurgduxwwkCATYVbgaRPtFAvzVBapxWQfHNU+/GxPbsZ2uOs9MNihA1d5dp+1zthv axOWu1AJWEjSxXBDKSrJwm3hSUBVd7W6sGRXSCMyGCnXAYf+cl+yPGUoCHQHO+adJhiC 2rHCQl+7uW/MU4JZ3u1+7/5N+grtqp2AkA2vvjgAeImbbDgJcuN/NEIewku2gbKHXGT/ r7Bknej0HdrgLRX9sK42anq8ov2epTvptIQrlEIEp/o2ut4pBHPU4m13dwu6VkuAhV7k N6zyiVinFKMGmv8CIn1B2+Rb1aiXntMF6gKJ1uXaztK1NwzVw+/ZyoYxBvhZUMm/rhZl RakQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Ioy9Q/oc6H0hEeQFC/lhOQXJnjsI7vMtB5m/9GAoov4=; b=0a8NMJMMROn2xuACKKbJmoF2+UoXGYCRgKhEoDobeRqvoBuktLE2MI/558M0sCtplE pLIIKbrrVKYlJYpt2KcV79Ij8h2E/5M/osAg+HOIra9ye2YkjvCcQDqczENP9ruXzHWJ ICQOq4Y/RKQ9MGFlr+YFW6+1HYcHXGuC30E1m7SfW+5lo4PEDMHtb5Q+08uFxW8dAR3j HKc3BFo3GOQ/o0go1rchrr1VQ0ScoWx6Bg3GgsqoEKbOKnl2SYhAUS4bDhntOYn6qYIG jDRLzuTxoSG6BHBsrHO+1Nl7J1xPfITehWkFqHaUJz8gvQlo3ey6eydIHaII+ErS5+vX FWQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n20si6768330pfi.226.2019.03.22.08.47.58; Fri, 22 Mar 2019 08:47:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728220AbfCVPr5 (ORCPT <rfc822;mike.holmes@linaro.org> + 31 others); Fri, 22 Mar 2019 11:47:57 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:57763 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727473AbfCVPr4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 22 Mar 2019 11:47:56 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MIdaF-1hARKf0n1p-00EbpP; Fri, 22 Mar 2019 16:47:36 +0100 From: Arnd Bergmann <arnd@arndb.de> To: stable@vger.kernel.org, Felipe Balbi <balbi@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Peter Chen <peter.chen@nxp.com>, Felipe Balbi <felipe.balbi@linux.intel.com>, Arnd Bergmann <arnd@arndb.de>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Chunfeng Yun <chunfeng.yun@mediatek.com>, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [BACKPORT 4.4.y 15/25] usb: gadget: composite: fix dereference after null check coverify warning Date: Fri, 22 Mar 2019 16:44:06 +0100 Message-Id: <20190322154425.3852517-16-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190322154425.3852517-1-arnd@arndb.de> References: <20190322154425.3852517-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:UHzL1C8wGGWp8Z6rjDkjmcHGnCq4ZND0jlzDxvJEFDcI4QzSMpX dsftbYeAGsMIFPD3UOU5TnyF8SXJLoet5YoGqms2eDMcAbOsUXpW4yNA5pRGqiOk0rbsZLX 5D2zbCjflsuGo9WxH+hGNkOkmS9hj+qWw3upfwWO8h/HExl2fLpZWc7ZcXE6JHsQ8uRH4fE OIe92it/gkA8w2+2FL1Rw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:v5QA9vpxahI=:qJY+RRUd76611b6rhteEig AsQOUp5bSnEEEzkTdVW9NLcXJ5Cq8jB02RvZYy2O0FEFm60pPUsWk0HP4gHBHTehIW+HMAfBy AFO84IxV+HvBB+ju/QocvQPTE0nboh4Lk226699EBvWpPMO522ULxsZ8q0zcdCgDh+anExwMt +fEk7FN2FKE8FFTvyuyfVLn1HH2xIrm5j0EJUtEq7QVSKCg87HbBzpSB0lBG39gqG3LSlVkc7 VLcf/9POgw3Ee8TmH6QpPHtz2kzEEiwzWOt8ayKALq9+AjQccqS2zZd59jjXmN+KyJ0eVlwdO fMCAPmYmwbp54/xSa9rd4gqTzzPem1W3kVe1zbYso+mutniDwUomwHLYaOiYjAYdj3CSPQQZX FQqAoy4zlNCerzTp0cGrfQ8C6suDk/mumdzBu5Ahzo/FKLcM10+kH1/T9R9FL8KeWjRPmEkYK o/S7V/RCO8izxzeSE84tMkw1couiEVonzKsUsgKY7ajMrHXp/kAoKoxbsaSmblXpLDjuwD7HL mgdj5Gn0hEwp2WHqPHjwLOQXQzyPH/uQH1DC9CjvGZxwWlJb/UyCDUM4y76B7hPEITZLXBKDp j+gx9NHB78d7YbNt/QREUwN+tMhxYw07DUhSeb0wfO4wuqGdb4dZHZE301FjRxPa+a6Sy0/hr oWHRMlHzgGaJuh7/xSWREO4g1vaeZjEXecO9dmDvbnVjLC2bATUujRZ1jK6huBFaJENLIEsw1 R+EO3OqdzB67zjhLnWcsvtenpGK96csHQFvcrg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
candidates from spreadtrum 4.4 product kernel
|
expand
|
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 58f5fbdb6959..8bf54477f472 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1819,6 +1819,8 @@ unknown: break; case USB_RECIP_ENDPOINT: + if (!cdev->config) + break; endp = ((w_index & 0x80) >> 3) | (w_index & 0x0f); list_for_each_entry(f, &cdev->config->functions, list) { if (test_bit(endp, f->endpoints))