Re: [PATCH v1] soc: bcm: Check for NULL return of devm_kzalloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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@xxxxxxx>

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



[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux