[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f8d78967-8842-57de-9464-4e281de2e7d7@gmail.com>
Date: Tue, 19 Apr 2022 11:33:48 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: QintaoShen <unSimple1993@....com>, f.fainelli@...il.com
Cc: bcm-kernel-feedback-list@...adcom.com, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] soc: bcm: Check for NULL return of devm_kzalloc()
On 3/24/2022 1:35 AM, QintaoShen wrote:
> As the potential failuer of allocation, devm_kzalloc() may return NULL.
> Then the 'pd->pmb' and the follow lines of code may bring null pointer dereference.
>
> Therefore, it is better to check the return value of devm_kzalloc() to avoid this confusion.
>
> Signed-off-by: QintaoShen <unSimple1993@....com>
Applied to https://github.com/Broadcom/stblinux/commits/drivers/next,
thanks!
I modified your patch to have a Fixes: tag as replied, and follow
Sergey's style recommendation.
--
Florian
Powered by blists - more mailing lists