Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp45866pxj; Tue, 15 Jun 2021 19:40:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSltx6g57D6qrvgyLIRLrnHR0R6T4PLtCcxguFJSX8rpCReiMO4UhbGsV5XR6o/XhP5stO X-Received: by 2002:a6b:f704:: with SMTP id k4mr1816585iog.191.1623811208413; Tue, 15 Jun 2021 19:40:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623811208; cv=none; d=google.com; s=arc-20160816; b=c16CuwDInYyYBBlwGbD6dLaUZ2hLZwkeIlcyAEpNXM4/LE0Ugc2ALCRl2ucTEe/H99 rhINUjY+kArr3zuMTyGVQbpERWukZnxHRrY2UalCNlEkmjgjotCfo9ZkqTotiidbNRbd dUvGh0m/eUwClWQK7KYkH979jxsiAFK4Ju/vrowZ7CnwxizVIvaRSij3n7/X2V/jvQFQ 4CxYfbJ44MIud4nYOnoEarNlgwGw2PGoSZOFQABmXuX7o2mOKHes5NwgUDoybV2Ma8Hv bZgedYfCX4AxsyrtcQC7zu0DcpQYN+7Fl50YpaMZeW+VLM2p2leJSuhavLM3M+XgNzsW e5zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=kigwK7eer2EaLzUkM57tO7eaoC720Hr9C/lMDkpHAwo=; b=OUHAsgTBaIBybGtydgI4zF4JqDYwNrMq0HVZNwgoe8UhZmE37JS8ILB4wuEyHZ8UKf 8yvKKDHZJmTpvFU7LtoJ6zrTNkVa5Mx/ozNv/98PbhaB+vOqik04NrbYcJeIK1UWbpgi 1Armd82OwgkojfGgRMATXdjTg8eRE67nZxFYgrmwV4H7BaS1T8KhCDwRJP09FA/vm26U KqG32Q19njyQ8rp4GEzzm2Amn9zBq5SoeXHj8Zfklo3d2S7ZQbhbPAKxK/xBuVdGbIPE fA7up1etem8m5u3I905byk0rdomE+BxkcYoNdv4yi4je9n+/q84nyWmKJkzhQj7v5pgk fM6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v17si829164ilg.30.2021.06.15.19.39.54; Tue, 15 Jun 2021 19:40:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231963AbhFPClX (ORCPT + 99 others); Tue, 15 Jun 2021 22:41:23 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:57600 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231287AbhFPClW (ORCPT ); Tue, 15 Jun 2021 22:41:22 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0UcZRreS_1623811153; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UcZRreS_1623811153) by smtp.aliyun-inc.com(127.0.0.1); Wed, 16 Jun 2021 10:39:15 +0800 From: Yang Li To: peppe.cavallaro@st.com Cc: alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, kuba@kernel.org, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] net: stmmac: Fix an error code in dwmac-ingenic.c Date: Wed, 16 Jun 2021 10:39:08 +0800 Message-Id: <1623811148-11064-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When IS_ERR(mac->regmap) returns true, the value of ret is 0. So, we set ret to -ENODEV to indicate this error. Clean up smatch warning: drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c:266 ingenic_mac_probe() warn: missing error code 'ret' Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c index 60984c1..f3950e0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c @@ -263,6 +263,7 @@ static int ingenic_mac_probe(struct platform_device *pdev) mac->regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "mode-reg"); if (IS_ERR(mac->regmap)) { dev_err(&pdev->dev, "%s: Failed to get syscon regmap\n", __func__); + ret = -ENODEV; goto err_remove_config_dt; } -- 1.8.3.1