[PATCH] Revert "mtd: spi-nor: core: Return error code from set_4byte_addr_mode()"
Mika Westerberg
mika.westerberg at linux.intel.com
Thu Sep 22 07:29:50 PDT 2022
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.
More information about the linux-mtd
mailing list