]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe()
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 20 Apr 2017 05:34:54 +0000 (07:34 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Sat, 22 Apr 2017 02:44:54 +0000 (19:44 -0700)
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>
drivers/clk/clk-si5351.c

index a4c009e1e70de5a1e3b85d3004cc77db08478c55..2492442eea77aa0c5abcf540e9bedb81e36d62d3 100644 (file)
@@ -1354,10 +1354,8 @@ static int si5351_i2c_probe(struct i2c_client *client,
                return -EINVAL;
 
        drvdata = devm_kzalloc(&client->dev, sizeof(*drvdata), GFP_KERNEL);
-       if (drvdata == NULL) {
-               dev_err(&client->dev, "unable to allocate driver data\n");
+       if (!drvdata)
                return -ENOMEM;
-       }
 
        i2c_set_clientdata(client, drvdata);
        drvdata->client = client;