[PATCH v2 1/2] soc: fsl: dpio: Use scope-based resource management in dpaa2_io_store_create()
Markus Elfring
Markus.Elfring at web.de
Wed Jul 29 01:24:32 PDT 2026
…
>> +++ b/drivers/soc/fsl/dpio/dpio-service.c
…
>> - size = max_frames * sizeof(struct dpaa2_dq) + 64;
>> - ret->alloced_addr = kzalloc(size, GFP_KERNEL);
>> - if (!ret->alloced_addr) {
>> - kfree(ret);
>> + ret->alloced_addr = kzalloc(max_frames * sizeof(struct dpaa2_dq) + 64, GFP_KERNEL);
>> + if (!ret->alloced_addr)
>> return NULL;
>
> Why convert the ret allocation but not the ret->alloced_addr allocation?
I suggest to reconsider the suggested influence of the attribute “__free(kfree)”
once more also according to data structure members.
Regards,
Markus
More information about the linux-arm-kernel
mailing list