Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3718850pxb; Mon, 24 Jan 2022 16:14:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxR3h4QHafJkwwGZODyeG6lS8zi59UPKUecTxJ/5gpxZltiLDfsH4IWxlUWSqc75m6y+t10 X-Received: by 2002:a17:902:c94d:b0:14b:2232:83ba with SMTP id i13-20020a170902c94d00b0014b223283bamr14184049pla.153.1643069671627; Mon, 24 Jan 2022 16:14:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643069671; cv=none; d=google.com; s=arc-20160816; b=S0MQJy5qEZDEIKerHshCracBbTzBy/CvatkMC/wUlLvfaX7I7bFDPG+y88PGxVIifm eRuCzkqcW+S14GG74aTP+BI6I273/Hcxt2i5156UnCy8onIhqeuYNSMjdaXi6JQe0Dhh LwIRowWFdsp0ref+rAAKCfjVEAyU/S2oW66XxsSxaldLj6vhNL//8gdCaGWFYnrxGl2W VxA7kMy4m/kLBVhvCfsQWw6mlq379/HoEGLfWhmtdEqt/n07VKes4F6QAvoUEW3P2RnA Zdu2/K7G/Jr/Ff663svcB3j2qJUULhPPkhuNkhnxUe4nV4XrrhdgE0s4+naJNgDciIT/ xckQ== 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=3XFw+6SkhkTf1vQN2HyqtgLEjk6mVWntP9OkrswlEtM=; b=R3SxiEvkkIkQctxQaZ5ylMLpAGjxo+jFZDxeiCEzPMdBrJcoA1IO487pu1sPdX9Q1m VWIVjN/8GaLU7kSATs9e2g6mZk1WwY6mnxPYrXKkONql0QWp0v1TDKD80oBCSaEiYKSk sakCaoWwknX1uwojfhrkZ+pN7o5mJT7zl0/hhDKXmtAWjFc1hfjj1rUQsFTeJqXyx5kx XID+gBi0g9hLy1Pt9wPJGbLj/XChd3kCYm6iUHeKpwtcK4ZxOsxQrBwXHj7iAZR5SDD7 UZRvawxYJPIn4nOTnstpFH5t8AE2S3edDQKScFqGpmJaaJse95xlQULP71Mb/5TJ3s1J R1Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=g4x0xfJR; 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 19si760700pjh.68.2022.01.24.16.14.15; Mon, 24 Jan 2022 16:14:31 -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=g4x0xfJR; 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 S2372191AbiAYAKs (ORCPT + 99 others); Mon, 24 Jan 2022 19:10:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1836973AbiAXWla (ORCPT ); Mon, 24 Jan 2022 17:41:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8A78C04D625; Mon, 24 Jan 2022 13:04:25 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 756AFB812A8; Mon, 24 Jan 2022 21:04:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94027C340E5; Mon, 24 Jan 2022 21:04:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058263; bh=KzpJCoQ7YeJ8gsCUsWa3i1sfOZTwvJHTEKYvDdhXVmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g4x0xfJRVbfv+VZ174qsxj+/ptzMa0rqry+z3dNg3QI9Xm35NrtnmtZyipQVUC1bC 4zlGJso/B92AnZLG/raux3EePBFFn5gZ/P/KlqEcmKZZRmkqcSdnyHTc15qvXD1iGk CPkkfMsuCtR9IbtT0JHl4s/3X/oMx5FOcRyj//Xk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Yingliang , "David S. Miller" , Sasha Levin Subject: [PATCH 5.16 0199/1039] net: lantiq: fix missing free_netdev() on error in ltq_etop_probe() Date: Mon, 24 Jan 2022 19:33:08 +0100 Message-Id: <20220124184132.013656393@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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: Yang Yingliang [ Upstream commit 2680ce7fc9939221da16e86a2e73cc1df563c82c ] Add the missing free_netdev() before return from ltq_etop_probe() in the error handling case. Fixes: 14d4e308e0aa ("net: lantiq: configure the burst length in ethernet drivers") Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/lantiq_etop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c index 072391c494ce4..14059e11710ad 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c @@ -687,13 +687,13 @@ ltq_etop_probe(struct platform_device *pdev) err = device_property_read_u32(&pdev->dev, "lantiq,tx-burst-length", &priv->tx_burst_len); if (err < 0) { dev_err(&pdev->dev, "unable to read tx-burst-length property\n"); - return err; + goto err_free; } err = device_property_read_u32(&pdev->dev, "lantiq,rx-burst-length", &priv->rx_burst_len); if (err < 0) { dev_err(&pdev->dev, "unable to read rx-burst-length property\n"); - return err; + goto err_free; } for (i = 0; i < MAX_DMA_CHAN; i++) { -- 2.34.1