Re: [PATCH] drm/vc4: Fix firmware reference leak in vc4_hvs_bind()

From: Wentao Liang

Date: Fri Nov 06 2026 - 04:27:06 EST


Hi Maíra,

Sorry for the very late reply, and thanks for the review.

You are right, and your suggestion is better than what I had. Moving
the firmware lookup below the clock lookups keeps the reference close to
its use, and the two rpi_firmware_put() calls in the error paths are not
needed anymore. The rpi_firmware_find_node() call moves with it, since
the device node reference it returns would otherwise be leaked by those
same error paths. I am sending v2 with that change.

About the other patch, "drm/vc4: Fix firmware reference leak in
vc4_drm_bind()": the same change would work there, since the only thing
between the firmware lookup and rpi_firmware_property() is
aperture_remove_all_conflicting_devices(), which does not use the
reference. That patch was already applied as b816da5d5df1 before this
comment, so it is in the tree as posted, with the extra
rpi_firmware_put() in the aperture error path.

Thanks,
Wentao