diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-04-20 01:34:54 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2017-04-21 22:44:54 -0400 |
commit | 56f2150a841ca0915d43e7b9033a4557bc829cc0 (patch) | |
tree | 53fff45f1ddfbacb79c9824d72810d090ee7a57a | |
parent | 9a78b16972fba06bc8d303282a6b96f5061fd16a (diff) |
clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe()
The script "checkpatch.pl" pointed information out like the following.
* CHECK: Comparison to NULL could be written "!drvdata"
Thus adjust this expression.
* WARNING: Possible unnecessary 'out of memory' message
Thus remove such a statement here.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r-- | drivers/clk/clk-si5351.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c index a4c009e1e70d..2492442eea77 100644 --- a/drivers/clk/clk-si5351.c +++ b/drivers/clk/clk-si5351.c | |||
@@ -1354,10 +1354,8 @@ static int si5351_i2c_probe(struct i2c_client *client, | |||
1354 | return -EINVAL; | 1354 | return -EINVAL; |
1355 | 1355 | ||
1356 | drvdata = devm_kzalloc(&client->dev, sizeof(*drvdata), GFP_KERNEL); | 1356 | drvdata = devm_kzalloc(&client->dev, sizeof(*drvdata), GFP_KERNEL); |
1357 | if (drvdata == NULL) { | 1357 | if (!drvdata) |
1358 | dev_err(&client->dev, "unable to allocate driver data\n"); | ||
1359 | return -ENOMEM; | 1358 | return -ENOMEM; |
1360 | } | ||
1361 | 1359 | ||
1362 | i2c_set_clientdata(client, drvdata); | 1360 | i2c_set_clientdata(client, drvdata); |
1363 | drvdata->client = client; | 1361 | drvdata->client = client; |