diff options
-rw-r--r-- | drivers/hwmon/ina2xx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c index 39e017b..3234e57 100644 --- a/drivers/hwmon/ina2xx.c +++ b/drivers/hwmon/ina2xx.c @@ -313,7 +313,8 @@ static int ina2xx_probe(struct i2c_client *client, data->config = &ina2xx_config[data->kind]; data->client = client; - if (data->rshunt <= 0) + if (data->rshunt <= 0 || + data->rshunt > data->config->calibration_factor) return -ENODEV; ret = ina2xx_init(data); |