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

Florian Fainelli florian.fainelli at broadcom.com
Mon Nov 16 15:01:39 PST 2026


From: Florian Fainelli <f.fainelli at gmail.com>

On Mon, 16 Nov 2026 19:02:54 +0530, Jai Luthra <jai.luthra at ideasonboard.com> 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 at intel.com>
> Reported-by: Dan Carpenter <error27 at gmail.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202611141210.9hmxzD2V-lkp@intel.com/
> Closes: https://lore.kernel.org/r/202611141218.5FZTnFtc-lkp@intel.com/
> Signed-off-by: Jai Luthra <jai.luthra at ideasonboard.com>
> ---

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



More information about the linux-arm-kernel mailing list