Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp401223ybl; Thu, 23 Jan 2020 00:25:22 -0800 (PST) X-Google-Smtp-Source: APXvYqxqMbakP8vFWn8LieixBI8j0mrRVgZLVaOcohtg1w+vZZm9yNBxvbB/GSkiYPbShahsXPLY X-Received: by 2002:a05:6830:1185:: with SMTP id u5mr9687237otq.147.1579767922522; Thu, 23 Jan 2020 00:25:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579767922; cv=none; d=google.com; s=arc-20160816; b=pUSn9wNQLKUupBUfcbNakHmQKuuGmJ6BItCAcXXxSh+fNwXILw81zg3bJtswZ3GZso 1rVwRgX2W/miEi3l6R1NikPp4iDBChA/2Sl3LspMg54g5sVeI0JY2rWsLE6xhiyy9NEf 2dl47U29kecNfgtz8Ahh8q8tlMqbOC2Q3DIYVQHadK7VSgIiBmhVWSC1ItVl0leJzD6d ti8ZeKRMFOizP3JfVNELBEsKC0NuT0KWQmjK66CLTIdbuwy5Ws5limjvjy50EpSMeRSr TdUeBQkJXwbBNF1vguCENx7WAanHIluIgS0unMEM5WwvkRZTExdH35dhj6tYaRAoyknr iIOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=v2rNH4Gsw0bzUghfyGUw+uoKwXzibWz9pq9H3oEz7bQ=; b=V+t/LNhOOrscjnPxZATg31HyxPzimrl5CzN32YXKQUcud6lt2IzjULrXxkP1daDOmP 4Fh1W69loZ91qGPet2N26fLk1RYy57tdWQUuS5Ph2vsafoTzDkiPVqZAVk43w2Wnf0HE /82GbcT5E/bNWEKtakmSELfb1m726jo6CB9HesgZOOtzYYVmxoM3Cvaan6A08L0oCtx7 hCvZ6GMPkYD3tayEvRjHbL7seCUYybQjmrZwKg/27vBkMkhqvk9Knvclb6GQ8FWZGZid WQ0lg5msXmtAsqjzoFDZxxUjuSompYV57Ky61/tBzmRrH3BEetTdt9KkqWxd3TUONjFG 2RyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b="B1qARC/k"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m17si839377otr.17.2020.01.23.00.25.10; Thu, 23 Jan 2020 00:25:22 -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=pass header.i=@st.com header.s=STMicroelectronics header.b="B1qARC/k"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728057AbgAWIXk (ORCPT + 99 others); Thu, 23 Jan 2020 03:23:40 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:57282 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726135AbgAWIXj (ORCPT ); Thu, 23 Jan 2020 03:23:39 -0500 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00N8DfUn017496; Thu, 23 Jan 2020 09:23:21 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=v2rNH4Gsw0bzUghfyGUw+uoKwXzibWz9pq9H3oEz7bQ=; b=B1qARC/kP+m68l3RIC3OE6xFWuO4hUxfbL9cUkfn2YW57LnXOqBB8SUJNsmrn91P2fTd 0h0xHn+Jc3ekuiajiilRpYjrQqk0e8hKKrToyrUalnWsqbL+hv+4/oTknEbr35rnoSsO RIno2e0Z4jOum+2O21AfF7qB6U1P7ndkFQyTFUs96UKY4lZsWrNLApZ2vqpGsmXzb8di TVOcjNaySGjBhi70Lm+zT+yRRdS7pATwSldb3YNJ85XCMtxmGl1526YTJv+j+LOcZlmT VhCG8naFSmDqaCDBvUB4nXNiANarXYEpG4TQ5gnWsnJsTBwiQKNI2rHX7ifA4sEBDcLC QQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2xkssp8r8r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Jan 2020 09:23:21 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0BA75100038; Thu, 23 Jan 2020 09:23:17 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag6node2.st.com [10.75.127.17]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id E9A4320EDDA; Thu, 23 Jan 2020 09:23:16 +0100 (CET) Received: from localhost (10.75.127.46) by SFHDAG6NODE2.st.com (10.75.127.17) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 23 Jan 2020 09:23:16 +0100 From: Christophe Kerello To: , , CC: , , , Christophe Kerello Subject: mtd: rawnand: free the nand_device object Date: Thu, 23 Jan 2020 09:22:48 +0100 Message-ID: <1579767768-32295-1-git-send-email-christophe.kerello@st.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG7NODE1.st.com (10.75.127.19) To SFHDAG6NODE2.st.com (10.75.127.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-22_08:2020-01-22,2020-01-22 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch releases the resources allocated in nanddev_init function. Fixes: a7ab085d7c16 ("mtd: rawnand: Initialize the nand_device object") Signed-off-by: Christophe Kerello --- drivers/mtd/nand/raw/nand_base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index f64e3b6..47c6396 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -5907,6 +5907,8 @@ void nand_cleanup(struct nand_chip *chip) chip->ecc.algo == NAND_ECC_BCH) nand_bch_free((struct nand_bch_control *)chip->ecc.priv); + nanddev_cleanup(&chip->base); + /* Free bad block table memory */ kfree(chip->bbt); kfree(chip->data_buf); -- 1.9.1