mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
i3c: master: renesas: Use __free(kfree) for xfer cleanup in renesas_i3c_send_ccc_cmd()
Use __free(kfree) for automatic cleanup, matching the pattern already used in other functions in this driver. Signed-off-by: Felix Gu <ustc.gu@gmail.com> Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Reviewed-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260406-renesas-v3-2-4b724d7708f4@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
d7665c3b4f
commit
57c91ca3dd
|
|
@ -748,7 +748,6 @@ static int renesas_i3c_send_ccc_cmd(struct i3c_master_controller *m,
|
|||
struct i3c_ccc_cmd *ccc)
|
||||
{
|
||||
struct renesas_i3c *i3c = to_renesas_i3c(m);
|
||||
struct renesas_i3c_xfer *xfer;
|
||||
struct renesas_i3c_cmd *cmd;
|
||||
int ret, pos = 0;
|
||||
|
||||
|
|
@ -758,7 +757,7 @@ static int renesas_i3c_send_ccc_cmd(struct i3c_master_controller *m,
|
|||
return pos;
|
||||
}
|
||||
|
||||
xfer = renesas_i3c_alloc_xfer(i3c, 1);
|
||||
struct renesas_i3c_xfer *xfer __free(kfree) = renesas_i3c_alloc_xfer(i3c, 1);
|
||||
if (!xfer)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -807,8 +806,6 @@ static int renesas_i3c_send_ccc_cmd(struct i3c_master_controller *m,
|
|||
if (ret)
|
||||
ccc->err = I3C_ERROR_M2;
|
||||
|
||||
kfree(xfer);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user