Re: [PATCH] memory: brcmstb_dpfe: fix testing array offset after use

From: Florian Fainelli
Date: Thu May 18 2023 - 18:50:28 EST


On 5/13/23 04:29, Krzysztof Kozlowski wrote:
Code should first check for valid value of array offset, then use it as
the index. Fixes smatch warning:

drivers/memory/brcmstb_dpfe.c:443 __send_command() error: testing array offset 'cmd' after use.

Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>

Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
--
Florian

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature