Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3457024imw; Mon, 11 Jul 2022 09:01:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s5RoQtK5xhooC4zE9JkbmLHAtGzSS4juoZbUtF/6LzHP2gG+NDfoouFIJwTkQ/l7AyPh5Y X-Received: by 2002:a17:902:f78c:b0:169:b76f:2685 with SMTP id q12-20020a170902f78c00b00169b76f2685mr19276678pln.41.1657555277877; Mon, 11 Jul 2022 09:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657555277; cv=none; d=google.com; s=arc-20160816; b=c79kjtugytRe4QrENIZyQz53wJRaFZY0zlT1OJboD+DazPncooDdhOwSt5eMFyf5ez QUPi5ltnuPp1UTbgSw7AoWSxZgzLV4qbPVohsh+FmP/YxnLi953dbgffC8MR8J5WEVwa TE0m4gpHN1GrhW1CldR2D5MgHqMRaWJ4TFODsygprtn5HfTwcsiOB0P7ztUrnDzl8zMW WlEMmpq1jMB69PSvP+ZWNaEBTcYPLeU8yTiCMpuhKx6gtIs5Vjrh+WFN9k2PLv4E0irz mLo5f4K1w/eZ9XnGNds2QNyp+aRFXxPHEINvGM4qpSspTpTTLAD/c4O/lVLH7flydbTv yzsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=cIQiEZi2Bn5s3Jy3b9GmDm/0WP9nS+ZdytV6ksFnF2A=; b=SyF7EQ/5GDBz8r5YFn1wWv3EoXHJQ306cS+czWGjoNy8KghUCqLK3Ip4IsHi9n0LAy U9eHhmua9l2qcRInhE0Nv04SEcWogrHO1dWh5CvizpZW7f08OVQUhUwYt9fTBA27fEFK f1OwY/o25Mscyno+b1TUdHLUOHBmsb9unhhrDEJ/n+C2kzFqms8SWeuqJrS2BMxARIHE oK7aeIAOJolxWqqJkNzuO998wjsbst6EZ3kzkF7F5r9ehW8xsHXOqfBqY66sf5T8isJ3 tcbbGDtujeS2H/g4ivz4YW8ta11lvLbuscLPlNqoYFEaJvF83Juys7XBeacmTnLyqcE2 frUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f17-20020a63e311000000b003fa63cec349si10342084pgh.832.2022.07.11.09.01.04; Mon, 11 Jul 2022 09:01:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232251AbiGKPZQ (ORCPT + 99 others); Mon, 11 Jul 2022 11:25:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231251AbiGKPZP (ORCPT ); Mon, 11 Jul 2022 11:25:15 -0400 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EDBE252A3; Mon, 11 Jul 2022 08:25:13 -0700 (PDT) Received: from andrey-lpc.intra.ispras.ru (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPS id 9B57140737D8; Mon, 11 Jul 2022 15:25:11 +0000 (UTC) From: Andrey Strachuk To: Peter Chen Cc: Andrey Strachuk , Greg Kroah-Hartman , Alexander Shishkin , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: [PATCH] usb: remove useless condition _ep_queue() Date: Mon, 11 Jul 2022 18:25:03 +0300 Message-Id: <20220711152503.17657-1-strochuk@ispras.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Comparison of 'ep' with NULL is useless since 'ep' is a result of container_of and cannot be NULL in any reasonable scenario. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Andrey Strachuk Fixes: 2dbc5c4c8314 ("usb: chipidea: get rid of camelcase names") --- drivers/usb/chipidea/udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 3b8bf6daf7d0..8ce31f9933e1 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -933,7 +933,7 @@ static int _ep_queue(struct usb_ep *ep, struct usb_request *req, struct ci_hdrc *ci = hwep->ci; int retval = 0; - if (ep == NULL || req == NULL || hwep->ep.desc == NULL) + if (req == NULL || hwep->ep.desc == NULL) return -EINVAL; if (hwep->type == USB_ENDPOINT_XFER_CONTROL) { -- 2.25.1