Home Home > GIT Browse > openSUSE-15.0
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-10 16:07:11 +0200
committerTakashi Iwai <tiwai@suse.de>2018-07-10 16:07:25 +0200
commitcab7a48756148bb1372f62ca8df25da503e111d4 (patch)
treef986e13fa93a1609ba84bfebdb7c381e07fd37e4
parent09c2f1ac5322025b2e2ef377a9cc9575e5b7a48f (diff)
hwmon: (pmbus/adm1275) Accept negative page register values
(bsc#1051510). suse-commit: 6b66c34de5559af7404fc8dc7805cb8b531940af
-rw-r--r--drivers/hwmon/pmbus/adm1275.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/pmbus/adm1275.c b/drivers/hwmon/pmbus/adm1275.c
index 00d6995af4c2..8a44e94d5679 100644
--- a/drivers/hwmon/pmbus/adm1275.c
+++ b/drivers/hwmon/pmbus/adm1275.c
@@ -154,7 +154,7 @@ static int adm1275_read_word_data(struct i2c_client *client, int page, int reg)
const struct adm1275_data *data = to_adm1275_data(info);
int ret = 0;
- if (page)
+ if (page > 0)
return -ENXIO;
switch (reg) {
@@ -240,7 +240,7 @@ static int adm1275_write_word_data(struct i2c_client *client, int page, int reg,
const struct adm1275_data *data = to_adm1275_data(info);
int ret;
- if (page)
+ if (page > 0)
return -ENXIO;
switch (reg) {