Re: [PATCH] driver core: platform: Simplify platform_device_alloc()
From: Vishal Moola (Fractile)
Date: Fri Sep 25 2026 - 08:38:26 EST
On Fri, Sep 25, 2026 at 11:39:28AM +0200, Cezary Rojewski wrote:
> There is no need to double check the 'pa' object.
>
> Reviewed-by: Dawid Osuchowski <dawid.osuchowski@xxxxxxxxxxxxxxx>
> Signed-off-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>
Minor nit: The commit message could be more descriptive (i.e. something
like "Check whether platform_object allocation failed once instead of
checking for success twice"). Although I imagine compilers are smart
enough to avoid double checking anyway (I haven't looked at the
generated code myself).
Either way the new code is more readable, so LGTM.
Reviewed-by: Vishal Moola (Fractile) <vishal.moola@xxxxxxxxx>