lkml.org 
[lkml]   [2019]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC 2/2] memory: add Renesas RPC-IF driver
From
Date
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

\
 
 \ /
  Last update: 2019-12-11 10:59    [W:0.183 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site