Commit 3a38a829 authored by Claus Hansen Ries's avatar Claus Hansen Ries Committed by Jakub Kicinski

net: ll_temac: platform_get_resource replaced by wrong function

The function platform_get_resource was replaced with
devm_platform_ioremap_resource_byname and is called using 0 as name.

This eventually ends up in platform_get_resource_byname in the call
stack, where it causes a null pointer in strcmp.

	if (type == resource_type(r) && !strcmp(r->name, name))

It should have been replaced with devm_platform_ioremap_resource.

Fixes: bd69058f ("net: ll_temac: Use devm_platform_ioremap_resource_byname()")
Signed-off-by: default avatarClaus Hansen Ries <chr@terma.com>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/cca18f9c630a41c18487729770b492bb@terma.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent afb373ff
......@@ -1443,7 +1443,7 @@ static int temac_probe(struct platform_device *pdev)
}
/* map device registers */
lp->regs = devm_platform_ioremap_resource_byname(pdev, 0);
lp->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(lp->regs)) {
dev_err(&pdev->dev, "could not map TEMAC registers\n");
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment