[PATCH] Revert "mtd: spi-nor: core: Return error code from set_4byte_addr_mode()"

Michael Walle michael at walle.cc
Thu Sep 22 07:58:48 PDT 2022


Am 2022-09-22 16:29, schrieb Mika Westerberg:
> On Thu, Sep 22, 2022 at 04:17:10PM +0200, Michael Walle wrote:
>> Am 2022-09-22 16:16, schrieb Mika Westerberg:
>> > On Thu, Sep 22, 2022 at 04:12:17PM +0200, Michael Walle wrote:
>> > > Am 2022-09-22 15:48, schrieb Mika Westerberg:
>> > > > This reverts commit 08412e72afba3a2daef3e7f3378c3753255a0017.
>> > > >
>> > > > The Intel SPI-NOR controller does not support this opcode so the driver
>> > > > ends up returning -EOPNOTSUPP and that makes the SPI flash chip probe
>> > > > fail like this:
>> > > >
>> > > >   [ 12.291082] spi-nor: probe of spi0.0 failed with error -524
>> > > >
>> > > > Whereas previously it worked just fine (and hence the return value
>> > > > probably was ignored in the first place).
>> > >
>> > > Can't we just ignore that return code then?
>> >
>> > Isn't this revert just doing that? ;-)
>> 
>> No? It also ignores other (valid) errors.
> 
> Okay, I will do that and ignore just -ENOTSUPP in v2.
> 
> However, there is also similar call in spi_nor_restore() where the 
> error
> also gets ignored so I wonder if it was originally intentional.

Yes that was intentional, because spi_nor_restore() returns void.

-michael



More information about the linux-mtd mailing list