From: Markus Elfring Date: Thu, 20 Apr 2017 05:34:54 +0000 (+0200) Subject: clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=56f2150a841ca0915d43e7b9033a4557bc829cc0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Stephen Boyd --- 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, 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;