diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-27 00:23:02 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-27 00:23:02 +0100 |
commit | 4f671fe2f9523a1ea206f63fe60a7c7b3a56d5c7 (patch) | |
tree | 0ee267a1b02f14040009fb337ff35542482626a5 /drivers | |
parent | Merge tag 'sound-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ti... (diff) | |
parent | hwmon: (ads7828) Check return value of devm_regmap_init_i2c (diff) | |
download | linux-4f671fe2f9523a1ea206f63fe60a7c7b3a56d5c7.tar.xz linux-4f671fe2f9523a1ea206f63fe60a7c7b3a56d5c7.zip |
Merge tag 'hwmon-for-linus-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fix from Guenter Roeck:
"Add missing return value check to ads7828 driver"
* tag 'hwmon-for-linus-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (ads7828) Check return value of devm_regmap_init_i2c
Diffstat (limited to 'drivers')
-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, &ads2830_regmap_config); } + if (IS_ERR(data->regmap)) + return PTR_ERR(data->regmap); + data->cmd_byte = ext_vref ? ADS7828_CMD_PD1 : ADS7828_CMD_PD3; if (!diff_input) data->cmd_byte |= ADS7828_CMD_SD_SE; |