From patchwork Tue Dec 21 02:20:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 526788 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5B07C433FE for ; Tue, 21 Dec 2021 02:20:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232424AbhLUCUl (ORCPT ); Mon, 20 Dec 2021 21:20:41 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:60506 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbhLUCUk (ORCPT ); Mon, 20 Dec 2021 21:20:40 -0500 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R561e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e01424; MF=yang.lee@linux.alibaba.com; NM=1; PH=DS; RN=5; SR=0; TI=SMTPD_---0V.HldxN_1640053238; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0V.HldxN_1640053238) by smtp.aliyun-inc.com(127.0.0.1); Tue, 21 Dec 2021 10:20:38 +0800 From: Yang Li To: gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] usb: early: Fix an error code in xdbc_init() Date: Tue, 21 Dec 2021 10:20:36 +0800 Message-Id: <20211221022036.80706-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org When xdbc_trace("hardware not used anymore\n") is performed, ret should be assigned -ENODEV to indicate this. Clean up smatch warning: drivers/usb/early/xhci-dbc.c:972 xdbc_init() warn: missing error code 'ret' Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/usb/early/xhci-dbc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 4502108069cd..fcb05a8948fa 100644 --- a/drivers/usb/early/xhci-dbc.c +++ b/drivers/usb/early/xhci-dbc.c @@ -969,6 +969,7 @@ static int __init xdbc_init(void) if (early_xdbc_console.index == -1 || (early_xdbc_console.flags & CON_BOOT)) { xdbc_trace("hardware not used anymore\n"); + ret = -ENODEV; goto free_and_quit; }