Commit bbc31108 authored by Dan Carpenter's avatar Dan Carpenter Committed by Ulf Hansson
Browse files

pmdomain: thead: Fix error pointer vs NULL bug in th1520_pd_reboot_init()



The devm_auxiliary_device_create() returns NULL on error.  It never
returns error pointers.  Using PTR_ERR_OR_ZERO() here means the function
always returns success.  Replace the PTR_ERR_OR_ZERO() call check with
a NULL check.

Fixes: 64581f41 ("pmdomain: thead: create auxiliary device for rebooting")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Acked-by: default avatarIcenowy Zheng <uwu@icenowy.me>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent de023206
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment