Hi Sergei, On Tue, 2019-12-10 at 22:39 +0300, Sergei Shtylyov wrote: [...] > --- /dev/null > +++ linux/drivers/memory/renesas-rpc-if.c > @@ -0,0 +1,590 @@ [...] > +int rpcif_io_xfer(struct rpcif *rpc) > +{ [...] > + default: > + regmap_write(rpc->regmap, RPCIF_SMENR, rpc->enable); > + regmap_write(rpc->regmap, RPCIF_SMCR, > + rpc->smcr | RPCIF_SMCR_SPIE); > + ret = wait_msg_xfer_end(rpc); > + if (ret) > + goto err_out; > + } > + > +exit: > + pm_runtime_put(rpc->dev); > + return ret; > + > +err_out: > + ret = reset_control_reset(rpc->rstc); If wait_msg_xfer_end() returned an error, but the reset succeeds, this will cause rpcif_io_xfer() to report success as well. I suspect you do not want to overwrite ret at this point. > + rpcif_hw_init(rpc, rpc->bus_size == 2); > + goto exit; > +} > +EXPORT_SYMBOL(rpcif_io_xfer); regards Philipp