Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp888710pxj; Wed, 16 Jun 2021 16:22:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzu0tvc7U2S6IzcVhZ4IGqlwT337dl1SFDLhpIN+HYUWHwfRRk5C0//QJOnDgo6YovTivxU X-Received: by 2002:a02:6382:: with SMTP id j124mr1632654jac.72.1623885749749; Wed, 16 Jun 2021 16:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623885749; cv=none; d=google.com; s=arc-20160816; b=AhQAzJt19cJ2s8xp3GhP5o70AXDgfvStpZ2cjhWuUVot5Oq2Q4DiYA8lJEZYjbHY1r YIWSk2z/MINyRFaplVjr+uPjj1ktehSyynE9yrndydiLQQmTeTnbEdyz0U4BiLJd7LCS XUIIXeNUDI/yhCI1ozKNMQQz8Ln1Nmj6QMtlMse5Qwqrc1nimYGrUWwBzsPiqXn73oDF tHmoB0gS/bxbKrFA53zmPaATezXRNY/1CrYf3dpmUjh/+3dK1s0obuYnNeC9DFzPHr2f 90MzulSNhbKJap0q19eM1nN1Iiw/QgTDUr85FWrDqHcZxuvloxrLGmfnZS7qNPwNq3Qx iLLg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eh0KY8W3WenvCcIp4DzLFrFC5UnI6xWhnfjzclJjKsM=; b=RuJqQcthDpe9FVqAcNMTwckt0zs4zGwsIlk4i4Jl631Ojyq4aHq46bq/YfZ5N4VP72 UApBfT3P0jpMUeP7Ah5D0YG908aPC3t4Fw8SMDsG5m/v1+gJgAR2GO9Ky9eomvnaD3g0 uqcdGr1QnpPuZ8LNK6mcmI9fw3do6mK21sqn/rfLp6sq03ka3iVc5OOO8g+DfQVXb4pz hD8sI7vYNRtnZ7EDbOUORgBA87S9/SaqJBmpb3/0b5ffPuuFEXOPhT8tFWBZJiWwjp2E IvnCvBAeOS/7XQne/FONc8hZfgNYpxmVyyTAti5TIhWPuSJzultgTdAf6vM4QVfMTTA+ nRjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i0lpmLtG; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si4567712ils.62.2021.06.16.16.22.18; Wed, 16 Jun 2021 16:22:29 -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=@linuxfoundation.org header.s=korg header.b=i0lpmLtG; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235122AbhFPPpF (ORCPT + 99 others); Wed, 16 Jun 2021 11:45:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:51110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235469AbhFPPmA (ORCPT ); Wed, 16 Jun 2021 11:42:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 32EE4613EF; Wed, 16 Jun 2021 15:37:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623857863; bh=AsN4evvrBe7Rx1ndBTLCA/QWPG7HrdqRBqmP3/aBpR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i0lpmLtG9m106VNaFZit6ky4bt+V+4nvyoHjhaeVJ3a6czKChw1CpptBz8l+oSrQb 7yuOUIHVFfl0shBT8r3UwjY1G9vDGROXy1Zr+L9nMqTMSFLKwnedchNn4pIwfTMSie RAFAjiy7C/2xQFwOC2kCb7Ucpj3byjS838TpMSuQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abaci Robot , Jiapeng Chong , "David S. Miller" , Sasha Levin Subject: [PATCH 5.12 31/48] ethernet: myri10ge: Fix missing error code in myri10ge_probe() Date: Wed, 16 Jun 2021 17:33:41 +0200 Message-Id: <20210616152837.632012159@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210616152836.655643420@linuxfoundation.org> References: <20210616152836.655643420@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 c84c8bf2bc20..fc99ad8e4a38 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c @@ -3815,6 +3815,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