Skip to content
Commit d9e47351 authored by Marek Vasut's avatar Marek Vasut Committed by Ulf Hansson
Browse files

pmdomain: imx8mp-blk-ctrl: Error out if domains are missing in DT



This driver assumes that domain->power_dev is non-NULL in its
suspend/resume path. The assumption is valid, since all the devices that
are being looked up here should be described in DT. In case they are not
described in DT, because the DT is faulty, suspend/resume attempt would
trigger NULL pointer dereference.

To avoid this failure, check whether the power_dev assignment is not NULL
right away in probe callback and fail early if it is.

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240119014807.268694-1-marex@denx.de


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5d7f58ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment