aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/reset/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/reset/core.c')
-rw-r--r--drivers/reset/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 8b1e79d90e91..6a71ff94f7ca 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -791,7 +791,7 @@ struct reset_control *__devm_reset_control_get(struct device *dev,
return ERR_PTR(-ENOMEM);
rstc = __reset_control_get(dev, id, index, shared, optional, acquired);
- if (!IS_ERR(rstc)) {
+ if (!IS_ERR_OR_NULL(rstc)) {
*ptr = rstc;
devres_add(dev, ptr);
} else {
@@ -933,7 +933,7 @@ devm_reset_control_array_get(struct device *dev, bool shared, bool optional)
return ERR_PTR(-ENOMEM);
rstc = of_reset_control_array_get(dev->of_node, shared, optional, true);
- if (IS_ERR(rstc)) {
+ if (IS_ERR_OR_NULL(rstc)) {
devres_free(devres);
return rstc;
}