Commit 43675ffa authored by Dan Carpenter's avatar Dan Carpenter Committed by Maxime Ripard

bus: sunxi-rsb: unlock on error in sunxi_rsb_read()

Don't forget to unlock before returning an error code.

Fixes: d787dcdb ('bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent c65d2359
......@@ -342,13 +342,13 @@ static int sunxi_rsb_read(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
ret = _sunxi_rsb_run_xfer(rsb);
if (ret)
goto out;
goto unlock;
*buf = readl(rsb->regs + RSB_DATA);
unlock:
mutex_unlock(&rsb->lock);
out:
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment