summaryrefslogtreecommitdiff
path: root/drivers/hwmon/ad7414.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-12-23 10:41:14 +0300
committerGrant Likely <grant.likely@secretlab.ca>2010-12-23 10:41:14 +0300
commitcfb13c5db08c90311a5defdde9a0328ee788cca5 (patch)
tree842cb60d1d19b99e550fdbc653723e4b13e51ee5 /drivers/hwmon/ad7414.c
parent4b6ba8aacbb3185703b797286547d0f8f3859b02 (diff)
parent90a8a73c06cc32b609a880d48449d7083327e11a (diff)
downloadlinux-cfb13c5db08c90311a5defdde9a0328ee788cca5.tar.xz
Merge commit 'v2.6.37-rc7' into devicetree/next
Diffstat (limited to 'drivers/hwmon/ad7414.c')
-rw-r--r--drivers/hwmon/ad7414.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hwmon/ad7414.c b/drivers/hwmon/ad7414.c
index 1e4c21fc1a89..86d822aa9bbf 100644
--- a/drivers/hwmon/ad7414.c
+++ b/drivers/hwmon/ad7414.c
@@ -178,11 +178,13 @@ static int ad7414_probe(struct i2c_client *client,
{
struct ad7414_data *data;
int conf;
- int err = 0;
+ int err;
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA |
- I2C_FUNC_SMBUS_READ_WORD_DATA))
+ I2C_FUNC_SMBUS_READ_WORD_DATA)) {
+ err = -EOPNOTSUPP;
goto exit;
+ }
data = kzalloc(sizeof(struct ad7414_data), GFP_KERNEL);
if (!data) {