[PATCH] mtd: Fix physmap_of to not exit upon unsuccessful partition scan

Scott Wood scottwood at freescale.com
Tue Feb 12 13:06:34 EST 2008


Stefan Roese wrote:
> The patch 9a310d21196f38f6ad0ad146057548653e495c09 ("[MTD] Factor out OF
> partition support from the NOR driver.") introduced an problem. Now the
> physmap_of driver returns with error upon the first unsuccessful
> partition scan (parse_mtd_partitions()). This is not wanted, since even
> when the RedBoot/cmdlinepart partition scan is unsuccessful, the other
> scan's (of_mtd_parse_partitions(), parse_obsolete_partitions()) should be
> done nevertheless.
> 
> This patch fixes this problem.
> 
> Signed-off-by: Stefan Roese <sr at denx.de>
> ---
> 
> Scott, could you please take a look at this patch and add you ACK if you
> think it is ok?

I was under the impression -- and looking at the code seems to back that 
up -- that parse_mtd_partitions() returns zero if the scan was 
unsuccessful due to the lack of a partition table, and negative only if 
there's a real error.

Under what conditions are you actually seeing this fail?

-Scott



More information about the linux-mtd mailing list