[PATCH 1/2] platform/raspberrypi: vc-sm-cma: Fix get_kernel_id check, pass NULL for pointer

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


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

On Mon, 16 Nov 2026 19:02:53 +0530, Jai Luthra <jai.luthra at ideasonboard.com> wrote:
> Fix a couple of issues reported by sparse on the vc-sm-cma driver.
> 
> The first is around the retval of get_kernel_id(), which we check for
> negative error codes after assigning it to a u32 value. Fix it by using
> a temporary signed integer for the check. While at it, also ensure
> during error handling that we call free_kernel_id() only if we got a
> valid one earlier.
> 
> The second is a minor warning around passing 0 instead of NULL for a
> pointer argument.
> 
> Fixes: 0d6409fd70af ("platform/raspberrypi: Add VideoCore shared memory support")
> Reported-by: kernel test robot <lkp at intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202611141042.Rxt6cuNo-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202611141002.jCrJ06DU-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