mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 06:53:30 -04:00
Coresight: Fix a NULL vs IS_ERR() bug in probe
The devm_platform_get_and_ioremap_resource() function doesn't
return NULL, it returns error pointers. Update the checking to
match.
Fixes: f78d206f3d ("Coresight: Add Coresight TMC Control Unit driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/dab039b9-d58a-41be-92f0-ff209cfabfe2@stanley.mountain
This commit is contained in:
committed by
Suzuki K Poulose
parent
b5060c17f9
commit
5442d22da7
@@ -204,8 +204,8 @@ static int ctcu_probe(struct platform_device *pdev)
|
||||
dev->platform_data = pdata;
|
||||
|
||||
base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
|
||||
if (!base)
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
drvdata->apb_clk = coresight_get_enable_apb_pclk(dev);
|
||||
if (IS_ERR(drvdata->apb_clk))
|
||||
|
||||
Reference in New Issue
Block a user