… > Fix this by freeing buf before returning the error code. How do you think about to use the attribute “__free(kfree)”? https://elixir.bootlin.com/linux/v6.19-rc2/source/include/linux/slab.h#L512 https://elixir.bootlin.com/linux/v6.19-rc2/source/drivers/soc/mediatek/mtk-svs.c#L785-L813 Regards, Markus