diff options
author | Javier Martinez Canillas <javier.martinez@collabora.co.uk> | 2014-07-04 16:24:09 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-07-21 11:54:30 -0400 |
commit | c0e0fcdaa9b307047e8f15a1e92bda0ba63f1b53 (patch) | |
tree | effe644d93df9661115191abd7f7c35aa69a24a4 /drivers/mfd | |
parent | b452d7b69d8ee1df6eb00005c0ea62cb774917c3 (diff) |
mfd: max77686: Make error checking consistent
Error checking across the driver is mostly consistent besides
a few exceptions, so change these exceptions for consistency.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/max77686.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c index ada4976d9876..87fe52ebf7b0 100644 --- a/drivers/mfd/max77686.c +++ b/drivers/mfd/max77686.c | |||
@@ -134,7 +134,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c, | |||
134 | 134 | ||
135 | max77686 = devm_kzalloc(&i2c->dev, | 135 | max77686 = devm_kzalloc(&i2c->dev, |
136 | sizeof(struct max77686_dev), GFP_KERNEL); | 136 | sizeof(struct max77686_dev), GFP_KERNEL); |
137 | if (max77686 == NULL) | 137 | if (!max77686) |
138 | return -ENOMEM; | 138 | return -ENOMEM; |
139 | 139 | ||
140 | i2c_set_clientdata(i2c, max77686); | 140 | i2c_set_clientdata(i2c, max77686); |
@@ -153,8 +153,8 @@ static int max77686_i2c_probe(struct i2c_client *i2c, | |||
153 | return ret; | 153 | return ret; |
154 | } | 154 | } |
155 | 155 | ||
156 | if (regmap_read(max77686->regmap, | 156 | ret = regmap_read(max77686->regmap, MAX77686_REG_DEVICE_ID, &data); |
157 | MAX77686_REG_DEVICE_ID, &data) < 0) { | 157 | if (ret < 0) { |
158 | dev_err(max77686->dev, | 158 | dev_err(max77686->dev, |
159 | "device not found on this channel (this is not an error)\n"); | 159 | "device not found on this channel (this is not an error)\n"); |
160 | return -ENODEV; | 160 | return -ENODEV; |
@@ -180,7 +180,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c, | |||
180 | IRQF_TRIGGER_FALLING | IRQF_ONESHOT | | 180 | IRQF_TRIGGER_FALLING | IRQF_ONESHOT | |
181 | IRQF_SHARED, 0, &max77686_irq_chip, | 181 | IRQF_SHARED, 0, &max77686_irq_chip, |
182 | &max77686->irq_data); | 182 | &max77686->irq_data); |
183 | if (ret != 0) { | 183 | if (ret) { |
184 | dev_err(&i2c->dev, "failed to add PMIC irq chip: %d\n", ret); | 184 | dev_err(&i2c->dev, "failed to add PMIC irq chip: %d\n", ret); |
185 | goto err_unregister_i2c; | 185 | goto err_unregister_i2c; |
186 | } | 186 | } |
@@ -188,7 +188,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c, | |||
188 | IRQF_TRIGGER_FALLING | IRQF_ONESHOT | | 188 | IRQF_TRIGGER_FALLING | IRQF_ONESHOT | |
189 | IRQF_SHARED, 0, &max77686_rtc_irq_chip, | 189 | IRQF_SHARED, 0, &max77686_rtc_irq_chip, |
190 | &max77686->rtc_irq_data); | 190 | &max77686->rtc_irq_data); |
191 | if (ret != 0) { | 191 | if (ret) { |
192 | dev_err(&i2c->dev, "failed to add RTC irq chip: %d\n", ret); | 192 | dev_err(&i2c->dev, "failed to add RTC irq chip: %d\n", ret); |
193 | goto err_del_irqc; | 193 | goto err_del_irqc; |
194 | } | 194 | } |