Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4127972ybc; Thu, 14 Nov 2019 22:29:40 -0800 (PST) X-Google-Smtp-Source: APXvYqykmisKQTDeqHFDF4f9kRxHFESrOZrMlEk1ERuQM/3EnYP+xdVSD2D2QZRqBl9oTfCqXXZw X-Received: by 2002:a17:906:1d02:: with SMTP id n2mr11320324ejh.219.1573799380387; Thu, 14 Nov 2019 22:29:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573799380; cv=none; d=google.com; s=arc-20160816; b=JbHD3QrZeEIFVZt0ePg152v5dw40D0KhFJ3TlbPLo/3hMU3p7VI1QwhYZxa4pBIaLe 9XQrqwmWvvte9wcf+3F9fwTWlVfaQyejaPNkVigtkFkp7KOD0V2ZyPFUeuslLVVeuxMq Uy1KXUMIyWfScTZAmbddqUWtDRrLlgWfdmswbfoWDD0Np3cfjez+TJeqhVpnOirJ0/ru UHgZM9Mf+5mW/qIOCF98EKSPXJdLYedU6hTp6DGaL5JaKhD6WXBOHEh7ywAT4hTje7pd rhpEkHbfbU43m4sS3CSP5kc6Al0PgTmXXwTJrmnqV/5Y7vS16oYJ9f9EiHBN9pajBcVo Mqjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=emY2gm5TsWVFMMimxBC4143icxj0Lbfx5oWae/Wjzvg=; b=CdSVFkp2kVlIGiR/p3ODvAzxnh95NKdAQw5oownWfiZ9ZRBlP20/r0Tyr2CrhG+IGg C8s4Kbe2/FVcs+BkcBPenVLoNuo6dULzPtumuaMBZL9PvsKOPZ4bmiU//Nz80PBBePNX r4ki/G/de9/t/x3l3LezRpSXTV28uk6AfooPDMS1Lqs7reBGrrOoXxRquV5X6A42nZ6J MCjICI8f1uHX1ZOdeMTqjP9cDP4bePyBX5DMAFWMLJN8Gxh5aJlGcfaaOWE8+jdZqpCB OdN7BEUJVDVUdK4eXfhHUDCRHIa4bOkEm3oIJIbsCGcPGxXSd5NqQ+3aW/BGKFEoJ4XT FOjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=deE53lHy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si5818422edl.273.2019.11.14.22.29.15; Thu, 14 Nov 2019 22:29:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=deE53lHy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727486AbfKOGZK (ORCPT + 99 others); Fri, 15 Nov 2019 01:25:10 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40512 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727164AbfKOGZK (ORCPT ); Fri, 15 Nov 2019 01:25:10 -0500 Received: by mail-pf1-f196.google.com with SMTP id r4so5942986pfl.7; Thu, 14 Nov 2019 22:25:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=emY2gm5TsWVFMMimxBC4143icxj0Lbfx5oWae/Wjzvg=; b=deE53lHyv3gBGOhbVrzsmx5AS+FgnvHsukhfzzzf8IlWkABanwS1kPT7d9+GGS7SLq 9vgDdWBzjQ1sqInHEcAwxncYtJ9ANUZRYKU9e3lUOd0rEauvyQOD9S28eJFfG617YpuF v9tXvhSw8nJEdeJQuaapRemOoqJTWTdpmkzVOF+1dGRbcONQLOG2GyGC6JbevBPIaJ4L Lg2VVozbDvEVzmuh2GSMJ3eS9OpPNshjmxhJMnv6H47/BAvsCf7LY+TwKAMn6f/5M9F4 5Z6Nt4FOsLwyr6TplE5YbIDUAKYeKFg0armnFHusn0X4SgEYgFV0LJicnKyEZOcVx1hA ENjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=emY2gm5TsWVFMMimxBC4143icxj0Lbfx5oWae/Wjzvg=; b=YkVJiK7Xof7itJDUVUiH3vzeRaam6+ogAqieOwul+sOjYZyNE/HwkC3Uv6b42pWeNT EUeaJ9LmlR9E1IdJdy2iPBdyz8zFK3qUm4RdtQbgU75HwT3RltLIXO6rjZRS3UJUHfuG OoETaMhcxRDDHRvxwJ5NisvVuKf2oadgCld58l4yjDz9xp/f22BdPqcfLCudkPVsToeA 8H5+7fX2Blmpe09KpJCZcIMNZJCcWszNY8Fvere27q2myqjm/8iV8sMfbM4dgLjoKLZU 98qcvpy4YAyNLT5CqozmwXWfcewvOs5oIisPZATaIn489izHJujj2tUJAdtr0jI3g2bt GZVA== X-Gm-Message-State: APjAAAUpC0DB2ra83ZxvuWgC2yNYV567IwCa/p62bSjMKAkaMJOcgDhg GYeZyQwZFbOvPB1C9WUp68M= X-Received: by 2002:a17:90a:a616:: with SMTP id c22mr17996247pjq.46.1573799109294; Thu, 14 Nov 2019 22:25:09 -0800 (PST) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.gmail.com with ESMTPSA id u9sm9256060pfm.102.2019.11.14.22.25.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2019 22:25:08 -0800 (PST) From: Chuhong Yuan Cc: Hans Ulli Kroll , Linus Walleij , "David S . Miller" , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH] net: gemini: add missed free_netdev Date: Fri, 15 Nov 2019 14:24:54 +0800 Message-Id: <20191115062454.7025-1-hslester96@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This driver forgets to free allocated netdev in remove like what is done in probe failure. Add the free to fix it. Signed-off-by: Chuhong Yuan --- drivers/net/ethernet/cortina/gemini.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index e736ce2c58ca..a8f4c69252ff 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -2524,6 +2524,7 @@ static int gemini_ethernet_port_remove(struct platform_device *pdev) struct gemini_ethernet_port *port = platform_get_drvdata(pdev); gemini_port_remove(port); + free_netdev(port->netdev); return 0; } -- 2.24.0