summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/button/button-qcom-pmic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/button/button-qcom-pmic.c b/drivers/button/button-qcom-pmic.c
index 34a976d1e6c..bad445efa86 100644
--- a/drivers/button/button-qcom-pmic.c
+++ b/drivers/button/button-qcom-pmic.c
@@ -86,7 +86,7 @@ static int qcom_pwrkey_probe(struct udevice *dev)
}
ret = pmic_reg_read(priv->pmic, priv->base + REG_SUBTYPE);
- if ((ret & 0x7) == 0) {
+ if (ret < 0 || (ret & 0x7) == 0) {
printf("%s: unexpected PMCI function subtype %d\n", dev->name, ret);
return -ENXIO;
}
@@ -133,7 +133,7 @@ static int button_qcom_pmic_bind(struct udevice *parent)
} else if (NODE_IS_RESIN(node)) {
uc_plat->label = "vol_down";
} else {
- printf("Unknown button node '%s' should be 'pwrkey' or 'resin'\n",
+ debug("Unknown button node '%s' should be 'pwrkey' or 'resin'\n",
ofnode_get_name(node));
device_unbind(dev);
}