diff options
author | Lee Jones <lee.jones@linaro.org> | 2015-10-27 12:14:06 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2016-01-14 03:43:52 -0500 |
commit | 4374b20c6c4fa8533e932567be9cd8872286da95 (patch) | |
tree | d4debc507436b620d81e7ac1d930bd2944467947 | |
parent | f90dff44641dedea02b1549a9dd5c00bae9230da (diff) |
mfd: aat2870-core: Remove unnecessary 'out of memory' message
WARNING: Possible unnecessary 'out of memory' message
+ if (!aat2870) {
+ dev_err(&client->dev,
total: 0 errors, 1 warnings, 524 lines checked
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/aat2870-core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c index 29b6a2d4ac72..3ba19a45f199 100644 --- a/drivers/mfd/aat2870-core.c +++ b/drivers/mfd/aat2870-core.c | |||
@@ -373,11 +373,8 @@ static int aat2870_i2c_probe(struct i2c_client *client, | |||
373 | 373 | ||
374 | aat2870 = devm_kzalloc(&client->dev, sizeof(struct aat2870_data), | 374 | aat2870 = devm_kzalloc(&client->dev, sizeof(struct aat2870_data), |
375 | GFP_KERNEL); | 375 | GFP_KERNEL); |
376 | if (!aat2870) { | 376 | if (!aat2870) |
377 | dev_err(&client->dev, | ||
378 | "Failed to allocate memory for aat2870\n"); | ||
379 | return -ENOMEM; | 377 | return -ENOMEM; |
380 | } | ||
381 | 378 | ||
382 | aat2870->dev = &client->dev; | 379 | aat2870->dev = &client->dev; |
383 | dev_set_drvdata(aat2870->dev, aat2870); | 380 | dev_set_drvdata(aat2870->dev, aat2870); |