diff options
Diffstat (limited to 'drivers/hwmon/ads7828.c')
-rw-r--r-- | drivers/hwmon/ads7828.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hwmon/ads7828.c b/drivers/hwmon/ads7828.c index bce4e9ff21bf..6c99ee7bafa3 100644 --- a/drivers/hwmon/ads7828.c +++ b/drivers/hwmon/ads7828.c | |||
@@ -147,6 +147,9 @@ static int ads7828_probe(struct i2c_client *client, | |||
147 | &ads2830_regmap_config); | 147 | &ads2830_regmap_config); |
148 | } | 148 | } |
149 | 149 | ||
150 | if (IS_ERR(data->regmap)) | ||
151 | return PTR_ERR(data->regmap); | ||
152 | |||
150 | data->cmd_byte = ext_vref ? ADS7828_CMD_PD1 : ADS7828_CMD_PD3; | 153 | data->cmd_byte = ext_vref ? ADS7828_CMD_PD1 : ADS7828_CMD_PD3; |
151 | if (!diff_input) | 154 | if (!diff_input) |
152 | data->cmd_byte |= ADS7828_CMD_SD_SE; | 155 | data->cmd_byte |= ADS7828_CMD_SD_SE; |