[PATCH v3 00/11] Fix NAND controllers probe functions error path

Boris Brezillon boris.brezillon at bootlin.com
Thu Apr 26 12:51:38 PDT 2018


On Sat, 21 Apr 2018 20:00:32 +0200
Miquel Raynal <miquel.raynal at bootlin.com> wrote:

> Hello all,
> 
> In order to remove the limitation that prevents dynamic allocations
> during the identification phase (nand_scan_ident()), we need to get rid
> of the nand_scan_ident()/nand_scan_tail() calls from drivers and only
> export nand_scan().
> 
> This series prepares the migration to nand_scan() by first fixing (and
> enhancing some times) the probe function error path of the drivers that
> do not use nand_scan() yet.
> 
> The three main problems addressed in the series are:
> 0/ unproper error path (fuzzy, styling issues, undescriptive goto's).
> 1/ a wrong error path that does not free/disable the resources
>    correctly.
> 2/ nand_cleanup() is not called upon error after a successful
>    nand_scan_tail().
> 3/ nand_release() is called instead of nand_cleanup(). nand_release()
>    does call nand_cleanup() and also mtd_device_unregister(), which
>    should not be called while mtd_device_register() as succeeded.
> 
> Thanks,
> Miquèl

Applied.

Thanks,

Boris

> 
> Changes since v2:
> =================
>  * Reworked the few remaining patches that needed small changes.
>  * docg4: changed the commit message as proposed.
>  * fsl_elbc/fsl_ifc: moved the wrong nand_release() out of the
>    'remove' function to avoid double free possible issues.
>  * fsmc/hisi504/lpc32xx_mlc/lpc32xx_slc: split the changes in two
>    commits, one to fix the goto labels/style, one that actually fixes
>    the function.
> 
> Changes since v1:
> =================
>  * Extracted only the patches fixing the error path from the first huge
>    series (50+ patches) that also converted the drivers to nand_scan().
>  * Changed wrong nand_release() calls to nand_cleanup().
> 
> 
> Miquel Raynal (11):
>   mtd: rawnand: docg4: fix the probe function error path
>   mtd: rawnand: fsl_elbc: fix probe function error path
>   mtd: rawnand: fsl_ifc: fix probe function error path
>   mtd: rawnand: fsmc: clean the probe function style
>   mtd: rawnand: fsmc: fix the probe function error path
>   mtd: rawnand: hisi504: clean the probe function error path
>   mtd: rawnand: hisi504: fix the probe function error path
>   mtd: rawnand: lpc32xx_mlc: clean the probe function
>   mtd: rawnand: lpc32xx_mlc: fix the probe function error path
>   mtd: rawnand: lpc32xx_slc: clean the probe function
>   mtd: rawnand: lpc32xx_slc: fix the probe function error path
> 
>  drivers/mtd/nand/raw/docg4.c         | 22 +++++++++++----------
>  drivers/mtd/nand/raw/fsl_elbc_nand.c | 13 ++++++++----
>  drivers/mtd/nand/raw/fsl_ifc_nand.c  | 12 +++++++++---
>  drivers/mtd/nand/raw/fsmc_nand.c     | 27 +++++++++++++------------
>  drivers/mtd/nand/raw/hisi504_nand.c  | 35 ++++++++++++---------------------
>  drivers/mtd/nand/raw/lpc32xx_mlc.c   | 38 +++++++++++++++++++-----------------
>  drivers/mtd/nand/raw/lpc32xx_slc.c   | 26 ++++++++++++------------
>  7 files changed, 91 insertions(+), 82 deletions(-)
> 




More information about the linux-mtd mailing list