[PATCH v3] dm: core: fix no null pointer detection in ofnode_get_addr_size_index()

Simon Glass sjg at chromium.org
Thu Jul 22 04:11:53 CEST 2021


On Mon, 12 Jul 2021 at 01:40, chenguanqiao <chenguanqiao at kuaishou.com> wrote:
>
> From: Chen Guanqiao <chenguanqiao at kuaishou.com>
>
> Fixed a defect of a null pointer being discovered by Coverity Scan:
>    CID 331544:  Null pointer dereferences  (REVERSE_INULL)
>    Null-checking "size" suggests that it may be null, but it has already been
>    dereferenced on all paths leading to the check.
>
> Signed-off-by: Chen Guanqiao <chenguanqiao at kuaishou.com>
> ---
> v3:
>   Add this changelog.
>
> v2:
>   1. Remove redundant return.
>   2. apply patch to u-boot/next.
>
>  drivers/core/ofnode.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list