summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/powercap/intel_rapl_tpmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/powercap/intel_rapl_tpmi.c b/drivers/powercap/intel_rapl_tpmi.c
index c016127b3497..4f4f13ded225 100644
--- a/drivers/powercap/intel_rapl_tpmi.c
+++ b/drivers/powercap/intel_rapl_tpmi.c
@@ -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;
}