Re: [PATCH 2/2] platform/raspberrypi: vchiq-mmal: Fix warnings in the zero-copy path

From: Florian Fainelli

Date: Mon Nov 16 2026 - 18:01:53 EST


From: Florian Fainelli <f.fainelli@xxxxxxxxx>

On Mon, 16 Nov 2026 19:02:54 +0530, Jai Luthra <jai.luthra@xxxxxxxxxxxxxxxx> wrote:
> Fix minor issues reported by sparse and smatch around the zero-copy
> support added in mmal-vchiq.
>
> If there is no handle present vc_sm_cma_get_vc_handle() might fail,
> which we check but end up printing and returing the value of the
> undefined `ret` variable. Fix it by returning -EINVAL and dropping `ret`
> from the print.
>
> While at it, also fix the stale reference to the function name
> "vc_sm_int_handle" in the error print, which was renamed to
> "vc_sm_cma_get_vc_handle".
>
> Secondly, during cleanup assign NULL instead of 0 to buf->vcsm_handle,
> which is a pointer.
>
> Fixes: 67d0fbe47f8a ("platform/raspberrypi: vchiq-mmal: Use vc-sm-cma to support zero copy")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <error27@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202611141210.9hmxzD2V-lkp@xxxxxxxxx/
> Closes: https://lore.kernel.org/r/202611141218.5FZTnFtc-lkp@xxxxxxxxx/
> Signed-off-by: Jai Luthra <jai.luthra@xxxxxxxxxxxxxxxx>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian