Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp490680pxb; Mon, 25 Oct 2021 12:16:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJdEX8KKm/pubIYjTLfjxFOZFnxEbz2k8r1tqbXWahgy58oR4SY0GHkX9vbVxXL5tTjXyp X-Received: by 2002:a17:90a:6b4d:: with SMTP id x13mr37710203pjl.208.1635189383496; Mon, 25 Oct 2021 12:16:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635189383; cv=none; d=google.com; s=arc-20160816; b=BieZwvc0tgyA1Ko77WeJVZeNoVrfdpS/5aiQG1q2/bJkBRnY0oG8WKaBt0FNzkpswZ 1pPp4ImrpRZF5YkR/HZWVtOi9ulUUAiLUZQmOD1dDnDVAplI443UWxWzWgdXzXdh+b+8 cPO1xQ6FfSDjVb4gEfR8DfppYjywXBFpH7u0NOLDy1rPunLouY9ucJDCGv3x0fYCrewi 3/5pR75Cq+NFAXaVS4RuXmSDFeYmCXTawUBpX3vpf2S7oAtzX/i5qTSDCk3pVrWdRT09 /jiqWkth7QjfZtsiCAfrvYtheQGvP+VgphSZsw7OJMspmuJkS9YksoUU4dU00Cuw7vko X3yA== 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=nAAjSKeDeI92j6OXbjo2ILd/LJMGNX4BuOq5wsk9brs=; b=dL7GyEO5LG8dv8HQB4Fk7Q8pd/49JHt8bG3w8xTaX1fEIIQQBeDerluNweC0zpSOhq iP39mKuVg69y0bH9GT9Duv9wToPCHLB6afEaMt1PTQFKXZ/2vFO4bRCYlYoARY1065Ub G2JM7bwVnc9UtrpB773KA28br3Tc7oI4C2lfi4EJu+RaeDQdnNFZYujB0OdbuP26B8Wu LKcZNDOeO8hrVDNxCUCZHcmLNxJabTRp4E+0dau7PH+IZ8cCHY9HL490veEQXArj0mwH sqp7JfVoGZ8TB3hPC13WzJlHItrlZoHtkXHs/pK/yf+VYk+MQ82pcoqZiiBYn6HW2h25 aHVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kGusySnB; 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 p3si25886081plr.115.2021.10.25.12.16.10; Mon, 25 Oct 2021 12:16:23 -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=kGusySnB; 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 S234297AbhJYRCl (ORCPT + 99 others); Mon, 25 Oct 2021 13:02:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:54904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234257AbhJYRC2 (ORCPT ); Mon, 25 Oct 2021 13:02:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BB9FB60FE8; Mon, 25 Oct 2021 17:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635181205; bh=zymw0Cd5SrCynRtyeFd4YXZw31nviPLgRFKiy/lGjyw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kGusySnBrcEH1kClVP8c9Al/x4OWy6Yj2GX9+EKYK4myG7l8qfr2dg3yb195B0b+k QGgJcKVdGzh4lfeZ7sBBds10E/xnR9NzIBuG7ejj+Pdpu3GumEsX9/UMJIugr7HTfD tmV9OSAWlhSQPv1bV7x+z0KRxC58/KIfeVa3CweGTD/b+VJPUq9SNknFr3MLDc/t4y KwMkSuYeTJWwM4JEZGg+Lh0xjx0sBnTw3Kp7F5mWoALoWSLnObZLj4SVjONCUmEzqz weRILJCruY9Tr4KepVmVRfUI0kL9PqSYTuXeCx9yA+luF+raKFlZrQ3cUb65Qimfre qRKWT3Z9WVYUA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Zheyu Ma , "David S . Miller" , Sasha Levin , sgoutham@marvell.com, kuba@kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.14 09/18] cavium: Return negative value when pci_alloc_irq_vectors() fails Date: Mon, 25 Oct 2021 12:59:22 -0400 Message-Id: <20211025165939.1393655-9-sashal@kernel.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211025165939.1393655-1-sashal@kernel.org> References: <20211025165939.1393655-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zheyu Ma [ Upstream commit b2cddb44bddc1a9c5949a978bb454bba863264db ] During the process of driver probing, the probe function should return < 0 for failure, otherwise, the kernel will treat value > 0 as success. Signed-off-by: Zheyu Ma Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net/ethernet/cavium/thunder/nic_main.c index 9361f964bb9b..816453a4f8d6 100644 --- a/drivers/net/ethernet/cavium/thunder/nic_main.c +++ b/drivers/net/ethernet/cavium/thunder/nic_main.c @@ -1193,7 +1193,7 @@ static int nic_register_interrupts(struct nicpf *nic) dev_err(&nic->pdev->dev, "Request for #%d msix vectors failed, returned %d\n", nic->num_vec, ret); - return 1; + return ret; } /* Register mailbox interrupt handler */ -- 2.33.0