Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp876094pxk; Thu, 17 Sep 2020 20:02:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMMN8xNEQYLs5rKOuhhKo+FE0uULzymJYtbtzqoJ8zzZBwv20WOoyvFzG4z8XUcIp42uOU X-Received: by 2002:a17:906:4151:: with SMTP id l17mr36018585ejk.116.1600398148756; Thu, 17 Sep 2020 20:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600398148; cv=none; d=google.com; s=arc-20160816; b=GubZo4yiVfyNiggeZh71gpaAxJ1Uf7ZYUnbvy4ASeW/QfVH5O6dUiNxzEoxQcnawcw 1l0Fj7L63pgiDZvFDz1bzJcQKGfXdkb/cw8Xvgl7Sik5mPE4wjgmHbTgavv61LnAgX/7 HV3+cn9cfSFZqBYlnY4YPkaFiU0X/RrC9sTl1Qrni6gneyaz5IyRiR7xhu11s5CXauyf aHvZ8klpZipqmLzvOVgnJrC2W3BBkzXbBaJOf6LjsAXvUBj2u9oGSfLkmFf5Bbu0t6hp UFJQ2D1JN7Be+4rTUGNm5Am/5mD6FEY0+4WZ5csAgGxzqvxKrfwY5ljYER2iV+ijAjrV FiWg== 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=1lOw4abDB0iG0uSNcZcLVsm6lYwyuTFNmOdrPgcDZus=; b=xsLPyOUgZ4B5W1HCGR7aK5HYYG5jDTCbeg+I3UNyAQnrhejV2PSx7saS0PoSmiXM2X K4Q98BxaBONpfptbRig8Mi46ahZeBLaCJSEO8W90aRkpwhqEsRIolou+p36/VJHSqXgK S24nG5/EJTbCGmD+VkOkZJ/KrKjeLpBP9XTZvFq8NEqdoj4tXcafyqJBLxmMMD2U4b1q gwfUtUNUN9K2zBH2Pu8OwNzO9NeitO+Y5ERfTPtpU6Hd/kCMqUpTZvlgZxeMPHdDSuNL WW/b+3rr3rUUR8UTYFQ/YnAlAl8dDsa+AyDIjqS9rFxubq6lFE8ZyEJnXHSvfH/XG3KH /BnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=L1gftzft; 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 e18si1107398edv.524.2020.09.17.20.02.05; Thu, 17 Sep 2020 20:02:28 -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=default header.b=L1gftzft; 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 S1730265AbgIRC6a (ORCPT + 99 others); Thu, 17 Sep 2020 22:58:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:55482 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbgIRCGQ (ORCPT ); Thu, 17 Sep 2020 22:06:16 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7F0DA23888; Fri, 18 Sep 2020 02:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394776; bh=/+pliRggyOjEy8m8uK+MrMptQUHltTkK+F/HawNYwaI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L1gftzftYm33zQFwLqABDEou2g6vahtYcKtp7HIo9u+wBIA4nDOOg4yJ2gOATZPKS yZ476RBH8wpLOHkJSwSbAytaIWhR17ILQ9FgeV0rNk0hCiJLVpaE8y3u4FddEFIY7J gcffAfHEBKk2C/q9RqpfKOiYWG1U7vaopMNl/ibw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wei Yongjun , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 250/330] dpaa2-eth: fix error return code in setup_dpni() Date: Thu, 17 Sep 2020 21:59:50 -0400 Message-Id: <20200918020110.2063155-250-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-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: Wei Yongjun [ Upstream commit 97fff7c8de1e54e5326dfeb66085796864bceb64 ] Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index 7a248cc1055a3..7af7cc7c8669a 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -2654,8 +2654,10 @@ static int setup_dpni(struct fsl_mc_device *ls_dev) priv->cls_rules = devm_kzalloc(dev, sizeof(struct dpaa2_eth_cls_rule) * dpaa2_eth_fs_count(priv), GFP_KERNEL); - if (!priv->cls_rules) + if (!priv->cls_rules) { + err = -ENOMEM; goto close; + } return 0; -- 2.25.1