Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3854709pxv; Mon, 28 Jun 2021 14:48:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa9DEAp79fAkOBS0XG4ChVE/cFMRfO3g5Ea0AdpsayHNg8F8TdINBvBw2CUicyrcIwDnW4 X-Received: by 2002:a17:906:cedd:: with SMTP id si29mr16613237ejb.81.1624916885663; Mon, 28 Jun 2021 14:48:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624916885; cv=none; d=google.com; s=arc-20160816; b=tkJFUXcN3HxDQNYIZg/BKtlQBd7gZWvT4qDPVkE0TeSIax2V+l+TJng+IKN7kdIVO/ iGw03efWkKaaw3zg4z2A6JMeWjSQhJJo7l5aYLK/ZPsaf4CzYC8iNcWbv/eDkCOMhuFu TCCUlCOyJ8wgzCHxYllCylml6+tZhALOp1n+vbEXKed5fHSS1wEWzTVx9iOXTfWgchzZ lmq91kesDQUBq6M62TBMlQvhw4+hNfBNt8YL2/TuVTE4SGUJcai2HXqaFmCRaoT75ex8 XBBkNB2H7/gZp/BSElS9EHxmuBKmUL9LBTf6p5kTyN2eGiUO8woAdcUkoDIAnHvlVWcG ZJoQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lV41srN7Mm51jpMnRaYmQhwGD2GJONlYl8U6a9yCXBI=; b=aWQbUIgnheokw2v8bRKWFceyco32pg/zaiPr7VnSU05tMVwwzXERqF5EHUsSTDXNCx 1EOOfh7Z0A7RHWiw9dtDaJoqCRkAIFIU4qiFwy14jKVTmx5+0Y8Y6PfB8IizyzMrb39u FJEpnWfiNGuCR42H4xav/EqdgnXN+w0AopUqhbkaeeXPawlILvPxKIvbiHjCwFRZLHnd dCTfN4Iq4cnTIE1wxsAQ35FL/Qp8o4CNCSFgMQnQdELKEc2OpnVHQT/ncVtHk0ag4GX9 cySTpfuT98no+HCfqxXAy30AINFWY3y7bdSY4ERS43Xauib0hcIByrSzWc7B+475ahtE Gpdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eg1Cg3YH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds7si18806112ejc.304.2021.06.28.14.47.38; Mon, 28 Jun 2021 14:48:05 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eg1Cg3YH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236827AbhF1PSb (ORCPT + 99 others); Mon, 28 Jun 2021 11:18:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:34082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236947AbhF1O41 (ORCPT ); Mon, 28 Jun 2021 10:56:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 80E2161C75; Mon, 28 Jun 2021 14:40:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891213; bh=HwkUWxdB04+3z1cNU4FKIS3SuMuWux3wDGdui7mJktI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eg1Cg3YH3fgeqqWvvvA07+QSITJ7/jFUFc3oiq2QPiB5Lwm5ZRf8nWhKE+UaG9cej ZsV2+BVWLoz9GRo/s8b5fegREepJKnGWhavG7LIRldObP5XwidP6wuvp2kZt3lETqR CMdCa2N4R/KD74GvuO6RxeplYEn+erzkbVtC16ckyhz2O0XGlCCHjc5APEbu0SuX2d /5f8GNvrNnlDaPjehz6jmS4VH4giRXXcfDp3QDQOYUP3y8gzG6Z91ApTurq1cYFy1z DHe2pyNQZtmKFsosdJMPASXCoowY0BLZLMNkMN+EyQ6bqaXwpfhJuLkOl1AiiZw4tl XzLXwewnW5WLA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jiapeng Chong , Abaci Robot , "David S . Miller" , Sasha Levin Subject: [PATCH 4.9 09/71] ethernet: myri10ge: Fix missing error code in myri10ge_probe() Date: Mon, 28 Jun 2021 10:39:01 -0400 Message-Id: <20210628144003.34260-10-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628144003.34260-1-sashal@kernel.org> References: <20210628144003.34260-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.274-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.9.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.9.274-rc1 X-KernelTest-Deadline: 2021-06-30T14:39+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiapeng Chong [ Upstream commit f336d0b93ae978f12c5e27199f828da89b91e56a ] The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'status'. Eliminate the follow smatch warning: drivers/net/ethernet/myricom/myri10ge/myri10ge.c:3818 myri10ge_probe() warn: missing error code 'status'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c index 02ec326cb129..5eeba263b5f8 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c @@ -4050,6 +4050,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) dev_err(&pdev->dev, "invalid sram_size %dB or board span %ldB\n", mgp->sram_size, mgp->board_span); + status = -EINVAL; goto abort_with_ioremap; } memcpy_fromio(mgp->eeprom_strings, -- 2.30.2