mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
powercap: RAPL: Fix a NULL vs IS_ERR() bug
The devm_ioremap_resource() function returns error pointers on error,
it never returns NULL. Update the check accordingly.
Fixes: 9eef7f9da9
("powercap: intel_rapl: Introduce RAPL TPMI interface driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
4658fe81b3
commit
49776c712e
1 changed files with 2 additions and 2 deletions
|
@ -255,8 +255,8 @@ static int intel_rapl_tpmi_probe(struct auxiliary_device *auxdev,
|
|||
}
|
||||
|
||||
trp->base = devm_ioremap_resource(&auxdev->dev, res);
|
||||
if (!trp->base) {
|
||||
ret = -ENOMEM;
|
||||
if (IS_ERR(trp->base)) {
|
||||
ret = PTR_ERR(trp->base);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue