Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp811084ybk; Wed, 13 May 2020 13:48:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBNGQbauG1jLlNc8dxr2tCVr6izZXUh3Vxk+ymjdrQFVVerrVVKksX4EHpkfIUz88Y2ut6 X-Received: by 2002:a17:906:a857:: with SMTP id dx23mr889807ejb.52.1589402935892; Wed, 13 May 2020 13:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589402935; cv=none; d=google.com; s=arc-20160816; b=aek9MLQLbPKvWfFc29TTkpXEdJ4oflXCL2yPZn+lLZvyko7/MsVDyOWrYKQ952ef7g /mKsj7LJrenGWQz+rL6BLLPcw/neuH+LJLQQqJDeMt0w+MhO0DcyS8mC03gg3nasVZi2 JnkgyIPuz1lDP5yofGVZqIlbSr11d72PzZNj/KJRGLPNhZ0pAprMXRTLIQaTiEx7NZ9a sERHtIUMSaF8z5Z6jRgExlbPHKcwWJVYphVx+3dzWWHyIcGl9rjWzN8fxa7ZbNU3S/+q pKS4oRGiLR/8hiR1uJZhHHUU78YaDzui/NDjZz8njwDJ5m9KrkAKgBOsTo2zvvL4J1/I Cc6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=qNFINO4LmLnihNyn5MMjfE3NjM7EuHWeSrFZM+Sj4XY=; b=wG0xOBmVg67mEA2MMPt1Klp6eLhZdLWxkg7X4yEtqelKFq30qa5+W+wRSaaotehuwk 0JNG5/wdEe3FCjXxrgCqQH7G/JlPTU0sVOSbO2+xAXeNodkHp3QiWqB9m7rT/pj0I8YX ZvaYupT9RiNQh0rO+p/EQnTaJ9tr0URqmNLsQnIMfSL26CskUXcfIbLO5yWFxwrwONR6 3ATViwTdkRuf+4b2E04vC1VqTM+dDUWwVsTG/u0BMfgohjcxSUiBTiLWuamGrkoc5xR7 WuMplMmCzS8BoI3uPFGwyWCEb2fDsqG7iLELwaSZURbApVWwxgpWjVTw56T0AOFzbC5Y l8eg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si539532ejz.40.2020.05.13.13.48.32; Wed, 13 May 2020 13:48:55 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389286AbgEMPff (ORCPT + 99 others); Wed, 13 May 2020 11:35:35 -0400 Received: from mga06.intel.com ([134.134.136.31]:38891 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389127AbgEMPfe (ORCPT ); Wed, 13 May 2020 11:35:34 -0400 IronPort-SDR: AZv9qNu4xcAWDIdIvPnQzYkR7v+/WV5OeTua4KTPg6ukje4VmqJnrHFn6typr/xGa2vkC7J8zY RpAOVAFYRmwg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2020 08:35:34 -0700 IronPort-SDR: pwsSBjsRnOgLG5QqYs80dlDULprquX2PSgKG/EHmKfpyRIohKpac0bIFTaL7UdVNLpYT6sStsn HrChOT8l8rvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,388,1583222400"; d="scan'208";a="298401178" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008.jf.intel.com with ESMTP; 13 May 2020 08:35:29 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jYtPw-006Rwo-39; Wed, 13 May 2020 18:35:32 +0300 Date: Wed, 13 May 2020 18:35:32 +0300 From: Andy Shevchenko To: "Ramuthevar,Vadivel MuruganX" Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, arnd@arndb.de, brendanhiggins@google.com, tglx@linutronix.de, boris.brezillon@collabora.com, anders.roxell@linaro.org, masonccyang@mxic.com.tw, robh+dt@kernel.org, linux-mips@vger.kernel.org, hauke.mehrtens@intel.com, qi-ming.wu@intel.com, cheol.yong.kim@intel.com Subject: Re: [PATCH v6 2/2] mtd: rawnand: Add NAND controller support on Intel LGM SoC Message-ID: <20200513153532.GT185537@smile.fi.intel.com> References: <20200513104615.7905-1-vadivel.muruganx.ramuthevar@linux.intel.com> <20200513104615.7905-3-vadivel.muruganx.ramuthevar@linux.intel.com> <20200513153405.GS185537@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200513153405.GS185537@smile.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 13, 2020 at 06:34:05PM +0300, Andy Shevchenko wrote: > On Wed, May 13, 2020 at 06:46:15PM +0800, Ramuthevar,Vadivel MuruganX wrote: ... > > +static int ebu_nand_remove(struct platform_device *pdev) > > +{ > > + struct ebu_nand_controller *ebu_host = platform_get_drvdata(pdev); > > + > > > + if (ebu_host) { > > How it can be NULL here? > > > + mtd_device_unregister(nand_to_mtd(&ebu_host->chip)); > > + nand_cleanup(&ebu_host->chip); > > + ebu_nand_disable(&ebu_host->chip); > > + > > + if (ebu_host->dma_rx || ebu_host->dma_tx) This is duplicate and thus redundant. > > + ebu_dma_cleanup(ebu_host); > > + > > + clk_disable_unprepare(ebu_host->clk); > > + } > > + > > + return 0; > > +} -- With Best Regards, Andy Shevchenko