Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Felix Gu and committed by
Alexandre Belloni
57c91ca3 d7665c3b

+1 -4
+1 -4
drivers/i3c/master/renesas-i3c.c
··· 748 748 struct i3c_ccc_cmd *ccc) 749 749 { 750 750 struct renesas_i3c *i3c = to_renesas_i3c(m); 751 - struct renesas_i3c_xfer *xfer; 752 751 struct renesas_i3c_cmd *cmd; 753 752 int ret, pos = 0; 754 753 ··· 757 758 return pos; 758 759 } 759 760 760 - xfer = renesas_i3c_alloc_xfer(i3c, 1); 761 + struct renesas_i3c_xfer *xfer __free(kfree) = renesas_i3c_alloc_xfer(i3c, 1); 761 762 if (!xfer) 762 763 return -ENOMEM; 763 764 ··· 805 806 ret = xfer->ret; 806 807 if (ret) 807 808 ccc->err = I3C_ERROR_M2; 808 - 809 - kfree(xfer); 810 809 811 810 return ret; 812 811 }