Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: e54a52a28a36 ("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

authored by

Dan Carpenter and committed by
Suzuki K Poulose
7fdd04e1 e54a52a2

+2 -2
+2 -2
drivers/hwtracing/coresight/coresight-tnoc.c
··· 183 183 dev_set_drvdata(dev, drvdata); 184 184 185 185 drvdata->base = devm_ioremap_resource(dev, &adev->res); 186 - if (!drvdata->base) 187 - return -ENOMEM; 186 + if (IS_ERR(drvdata->base)) 187 + return PTR_ERR(drvdata->base); 188 188 189 189 spin_lock_init(&drvdata->spinlock); 190 190