[PATCH 2/2] soc: imx: imx8mp-blk-ctrl: Fix NULL pointer dereference
Marek Vasut
marex at denx.de
Sun Dec 18 08:31:43 PST 2022
On 12/18/22 14:29, Adam Ford wrote:
Hi,
>>>>> diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk-ctrl.c
>>>>> index b7d4161fcda9c..916bf0b3bc975 100644
>>>>> --- a/drivers/soc/imx/imx8mp-blk-ctrl.c
>>>>> +++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
>>>>> @@ -553,7 +553,7 @@ static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
>>>>>
>>>>> domain->power_dev =
>>>>> dev_pm_domain_attach_by_name(dev, data->gpc_name);
>>>>> - if (IS_ERR(domain->power_dev)) {
>>>>> + if (IS_ERR_OR_NULL(domain->power_dev)) {
>>>>> dev_err_probe(dev, PTR_ERR(domain->power_dev),
>>>>> "failed to attach power domain %s\n",
>>>>> data->gpc_name);
>>>>
>>>> Same problem as with the other patch, you shouldn't use 0 as error
>>>> value.
>>>
>>> This and IIRC Lucas already had a patch to fix.
>>
>> Seems there is a fix for 8m-blk-ctrl, not 8mp , but the fix would then
>> be identical.
>
> I think this might be the patch from Lucas that Marco was referencing:
>
> https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=671618&archive=both&state=*
Since Linux 6.1 does not even boot on i.MX8MP and crashes before even
printing anything on console (unless you use earlycon), it would be good
to apply the 1/3 or "[PATCH] soc: imx: imx8mp-blk-ctrl: Do not set power
domain name" I sent yesterday.
More information about the linux-arm-kernel
mailing list