Skip to content
Commit b4bd2aaf authored by QintaoShen's avatar QintaoShen Committed by Florian Fainelli
Browse files

soc: bcm: Check for NULL return of devm_kzalloc()



As the potential failure 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.

Fixes: 8bcac401 ("soc: bcm: add PM driver for Broadcom's PMB")
Signed-off-by: default avatarQintaoShen <unSimple1993@163.com>
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
parent 31231092
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment