Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp834024pxu; Mon, 23 Nov 2020 05:28:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyh9r3SjY7OcIAFDMk/K+46BeItQBaKP77pf364x/6lGs7ucTR8bBTRQR6YU3Kg/pHp6f8F X-Received: by 2002:a05:6402:1350:: with SMTP id y16mr14045092edw.360.1606138115592; Mon, 23 Nov 2020 05:28:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606138115; cv=none; d=google.com; s=arc-20160816; b=MYDFIC4T4djKTaRwYdriwPk3LKCKFSVZx5GcCuAJNMyQaCuK7g2sOgcUsPGct+oyI0 L92+7h9JD79VYj5CgUxQ4X1t9zVfEedpRYs2q2kl6gM24E6Oqq3m0vXikfVDK5PbfjZR TY9/QlVlTg6qI6xjmHKeWRhAJN8buHK9t6yBTL32xWGPVsUu70pMsFnxZr0txHSegOqY SE4SgXGxnWVZ3w/htthwlWlj2xuSPxs1UhQxIKsQBXQn3OgLNS5+LzmwFaBiAm0IfRMB sQNU2eRUZJUvvhAHwDBAhEb8OaV0TYgs7zVXoPZHu2ISEEqyFokSnB+Yt5+DI1uZYRGv H6Pg== 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=u3woTfIIaxZVPf9WQf1miheQnYN88MOwQdfHYHbvxJg=; b=dvSYg1VnJAWsHnfgy7riYMjpY1vB8+8DpA90vT00q98GAGvqduF6GpiSDEQcgOAzSo 84ARPDPlGf0ApabrGoVNnjFaL558LTnZBNXKHbel7Z/HdhrrJep6IAiO8S1MD42suix/ 0WzQT/UAk6T8DloGi4Kc86SSCCiw71g/FXgd9HMasy1Nsn2w8hKLdAnunWGEswKcHt79 /t9C3Ws5bkBrQp6m9+kBVM6qF+It+CZ/iDHkFNqLfGk+W9iSM6WbB/aubwPqChuvn7Ik bbCk832F7KkZ8oxRTjga8VI5mDAfNc7S0sCPYlRZc7rQ88QMp5Hhgnc0Ol3J/T6SvreJ AR+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B+iSASYg; 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 hh13si6570260ejb.360.2020.11.23.05.28.12; Mon, 23 Nov 2020 05:28:35 -0800 (PST) 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=B+iSASYg; 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 S1731341AbgKWMeU (ORCPT + 99 others); Mon, 23 Nov 2020 07:34:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:45860 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731326AbgKWMeN (ORCPT ); Mon, 23 Nov 2020 07:34:13 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 586902065E; Mon, 23 Nov 2020 12:34:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606134852; bh=nkMEbw7y4uctaWp/3Yr/LsCUmBn1Twxw2ozfR+zNMnY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B+iSASYg5fW3nP6FQP1ncNsoS6+rZHCicPLP2N0L5gw/IYXqW53wbzNs212WipmLN 0yE+JhEkEA6ExH1CJSpNzQq35/ZRLMfzfJjtPProne1rcM97qfpfBkFLB0sbvcdEga o+Gihzx/W11rkivAi29uC6UhS/DU3lSJQb4U7QZQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhang Changzhong , Jakub Kicinski Subject: [PATCH 5.4 014/158] net: ethernet: ti: cpsw: fix error return code in cpsw_probe() Date: Mon, 23 Nov 2020 13:20:42 +0100 Message-Id: <20201123121820.626225773@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121819.943135899@linuxfoundation.org> References: <20201123121819.943135899@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: Zhang Changzhong [ Upstream commit 35f735c665114840dcd3142f41148d07870f51f7 ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1605250173-18438-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ti/cpsw.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2876,6 +2876,7 @@ static int cpsw_probe(struct platform_de CPSW_MAX_QUEUES, CPSW_MAX_QUEUES); if (!ndev) { dev_err(dev, "error allocating net_device\n"); + ret = -ENOMEM; goto clean_cpts; }