Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5647987iog; Thu, 23 Jun 2022 02:30:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sVRg9jTvFqNMUX0RDp8vmKB42KCgnoN8GJ/YqLoGnhTvBpKrce9++OkZiwJq6oouUiepHe X-Received: by 2002:a17:907:6282:b0:6e0:c64a:60a7 with SMTP id nd2-20020a170907628200b006e0c64a60a7mr7183229ejc.349.1655976646937; Thu, 23 Jun 2022 02:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655976646; cv=none; d=google.com; s=arc-20160816; b=tr8WyYFpI+1d1JhhO5sw+4izYVrnlaPJOmzveuh8f/jDB6cimtSqW+KEWzMntDNrJ/ 6RqUuqF7gHL6m3dBT5UkF6BGwk44iIa9fBtpmfcin3U8LRsVF9SGHUbqDHvy85ypUCwJ BUh/D02hhlLkBbQi7aiEUun5yaD4JFAfa0H3T72r0FEN2tTZkjjRzgweam1CGn2wrQm5 EDFoWRdysuWMWN56/v5Q2Vlzmyr+/crRZLgNuQ+7+ppRgSP2L+WhRp2nyud+fDXUHDn1 Jt5rI7VqndDG0bi1YmffH90emXXKX514LydwIVaaNXw0vHwHGhDYU3RuzMjkVoooimTZ 9O6g== 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=ZGbHZE+gsXe1JdTrVFmnFKdUSUganTxQ8q7ru5eTyzA=; b=d8IQWhvgL5ZYDazxJRb66sZINgnk2cbLtHp1CNnXJ3GFL4cyk2kKR9G2Af5jFrYA7a /gCuozvaFZ4UaRhOGYIFXE8x22hG/kU1E3NBu2glCCca3rFiXvUgd/D7x7UsVrZwHp1J JMJJxsuO8/VQNcjOpk+UJIfsHn3AL3TG42C2xZH6avzlvbQJq/zUiT/v1nlyPrn63pay TUYQmqqY8I+nkesCHhGYr22sb49J2nWztduGUnz1oj1s8xew7J/WxzKKyptPoclqJU4C K1yFO5wVlQCPlidWX3DKUXfz9MawZ50GScabHp2JCwu9wEir1C1VJnQo6+3cURTnACsn gEEA== 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=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a05640242d000b004355878ad42si124569edc.624.2022.06.23.02.30.15; Thu, 23 Jun 2022 02:30:46 -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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbiFWIpo (ORCPT + 99 others); Thu, 23 Jun 2022 04:45:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbiFWIpn (ORCPT ); Thu, 23 Jun 2022 04:45:43 -0400 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C270149249; Thu, 23 Jun 2022 01:45:42 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VHAqFao_1655973934; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VHAqFao_1655973934) by smtp.aliyun-inc.com; Thu, 23 Jun 2022 16:45:39 +0800 From: Jiapeng Chong To: kishon@ti.com Cc: lpieralisi@kernel.org, kw@linux.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] NTB: EPF: Fix missing error code in epf_ntb_bind() Date: Thu, 23 Jun 2022 16:45:31 +0800 Message-Id: <20220623084531.39837-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'. This was found by smatch: drivers/pci/endpoint/functions/pci-epf-vntb.c:1317 epf_ntb_bind() warn: missing error code 'ret'. Signed-off-by: Jiapeng Chong --- drivers/pci/endpoint/functions/pci-epf-vntb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c index ebf7e243eefa..8791638b9f48 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -1314,6 +1314,7 @@ static int epf_ntb_bind(struct pci_epf *epf) if (pci_register_driver(&vntb_pci_driver)) { dev_err(dev, "failure register vntb pci driver\n"); + ret = -EINVAL; goto err_bar_alloc; } -- 2.20.1.7.g153144c