[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b3813a4e-3956-254c-a7cf-0fca65dc2cdd@linaro.org>
Date: Sun, 24 Sep 2023 13:41:23 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: "Dr. David Alan Gilbert" <dave@...blig.org>,
matthew.brost@...el.com, mgreer@...malcreek.com
Cc: linux-kernel@...r.kernel.org, airlied@...il.com,
intel-gfx@...ts.freedesktop.org
Subject: Re: ERR_PTR(0) in a couple of places
On 24/09/2023 02:41, Dr. David Alan Gilbert wrote:
> Hi,
> I randomly noticed there are a couple of places in the kernel that
> do
> ERR_PTR(0);
>
> and thought that was odd - shouldn't those just be NULL's ?
>
> 1) i915
> drivers/gpu/drm/i915/gt/uc/selftest_guc_multi_lrc.c : 47
>
> if (i <= 1)
> return ERR_PTR(0);
>
> from f9d72092cb490
>
> 2) trf7970a
> drivers/nfc/trf7970a.c : 896
>
> trf->ignore_timeout =
> !cancel_delayed_work(&trf->timeout_work);
> trf->rx_skb = ERR_PTR(0);
I would guess that code is relying on rx_skb being valid pointer or ERR
(if (!IS_ERR(...))).
Best regards,
Krzysztof
Powered by blists - more mailing lists