Commit bbc3110
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: 64581f4 ("pmdomain: thead: create auxiliary device for rebooting")
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Icenowy Zheng <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>1 parent de02320 commit bbc3110
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
182 | 184 | | |
183 | | - | |
| 185 | + | |
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
| |||
0 commit comments