coresight: tnoc: Fix a NULL vs IS_ERR() bug in probe

The devm_ioremap_resource() function returns error pointers on error.
It never returns NULL.  Update the error checking to match.

Fixes: e54a52a28a ("coresight: add coresight Trace Network On Chip driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/7bd9fae8-a15f-412a-8800-ce47acf0b5ce@sabinyo.mountain
This commit is contained in:
Dan Carpenter 2025-07-16 14:38:30 -05:00 committed by Suzuki K Poulose
parent e54a52a28a
commit 7fdd04e15a

View File

@ -183,8 +183,8 @@ static int trace_noc_probe(struct amba_device *adev, const struct amba_id *id)
dev_set_drvdata(dev, drvdata);
drvdata->base = devm_ioremap_resource(dev, &adev->res);
if (!drvdata->base)
return -ENOMEM;
if (IS_ERR(drvdata->base))
return PTR_ERR(drvdata->base);
spin_lock_init(&drvdata->spinlock);