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

Scott Wood
2008-02-12T19:27:06Z

Stefan Roese wrote:
> On Tuesday 12 February 2008, Scott Wood wrote:
>> Under what conditions are you actually seeing this fail?
>
> When CONFIG_MTD_REDBOOT_PARTS is not defined for example it returns with -22
> (EINVAL).

Ah, I see -- it seems the cmdline partition code behaves differently
than the redboot code.

Your patch changes it to treat zero as success, however -- which breaks
some other cases. The test should be "err <= 0", which is what
parse_mtd_partiitions() itself uses in its loop.

-Scott