Skip to content

Commit 43675ff

Browse files
Dan Carpentermripard
authored andcommitted
bus: sunxi-rsb: unlock on error in sunxi_rsb_read()
Don't forget to unlock before returning an error code. Fixes: d787dcd ('bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
1 parent c65d235 commit 43675ff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/bus/sunxi-rsb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,13 +342,13 @@ static int sunxi_rsb_read(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
342342

343343
ret = _sunxi_rsb_run_xfer(rsb);
344344
if (ret)
345-
goto out;
345+
goto unlock;
346346

347347
*buf = readl(rsb->regs + RSB_DATA);
348348

349+
unlock:
349350
mutex_unlock(&rsb->lock);
350351

351-
out:
352352
return ret;
353353
}
354354

0 commit comments

Comments
 (0)