Re: [PATCH v2 1/2] soc: fsl: dpio: Use scope-based resource management in dpaa2_io_store_create()
Markus Elfring <[email protected]> Wed, 29 Jul 2026 10:24:32 +0200
| Newsgroups | gmane.linux.ports.ppc.embedded,gmane.linux.ports.arm.kernel,gmane.linux.kernel,gmane.linux.kernel.janitors |
|---|---|
| Message-ID | <[email protected]> |
=E2=80=A6
>> +++ b/drivers/soc/fsl/dpio/dpio-service.c
=E2=80=A6
>> - size =3D max_frames * sizeof(struct dpaa2_dq) + 64;
>> - ret->alloced_addr =3D kzalloc(size, GFP_KERNEL);
>> - if (!ret->alloced_addr) {
>> - kfree(ret);
>> + ret->alloced_addr =3D kzalloc(max_frames * sizeof(struct dpaa2_dq) + =
64, GFP_KERNEL);
>> + if (!ret->alloced_addr)
>> return NULL;
>=20
> Why convert the ret allocation but not the ret->alloced_addr allocation?
I suggest to reconsider the suggested influence of the attribute =E2=80=9C=
__free(kfree)=E2=80=9D
once more also according to data structure members.
Regards,
Markus