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

From: Florian Fainelli

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


From: Florian Fainelli <f.fainelli@xxxxxxxxx>

On Mon, 16 Nov 2026 19:02:53 +0530, Jai Luthra <jai.luthra@xxxxxxxxxxxxxxxx> 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@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202611141042.Rxt6cuNo-lkp@xxxxxxxxx/
> Closes: https://lore.kernel.org/oe-kbuild-all/202611141002.jCrJ06DU-lkp@xxxxxxxxx/
> Signed-off-by: Jai Luthra <jai.luthra@xxxxxxxxxxxxxxxx>
> ---

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