• Brian Norris's avatar
    mtd: mtdpart: Do not fail mtd probe when parsing partitions fails · 5a2415b0
    Brian Norris authored
    Due to wrong assumption in ofpart ofpart fails on Exynos on SPI chips
    with no partitions because the subnode containing controller data
    confuses the ofpart parser.
    
    Thus compiling in ofpart support automatically fails probing any SPI NOR
    flash without partitions on Exynos.
    
    Compiling in a partitioning scheme should not cause probe of otherwise
    valid device to fail.
    
    Instead, let's do the following:
     * try parsers until one succeeds
     * if no parser succeeds, report the first error we saw
     * even in the failure case, allow MTD to probe, with fallback
       partitions or no partitions at all -- the master device will still be
       registered
    
    Issue report and comments initially by Michal Suchanek.
    Reported-by: default avatarMichal Suchanek <hramrach@gmail.com>
    Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
    5a2415b0
mtdcore.c 34.6 KB