Commit 57c91ca3 authored by Felix Gu's avatar Felix Gu Committed by Alexandre Belloni
Browse files

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: default avatarFelix Gu <ustc.gu@gmail.com>
Tested-by: default avatarTommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: default avatarTommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: default avatarFrank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260406-renesas-v3-2-4b724d7708f4@gmail.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent d7665c3b
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;
}