Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S943653AbdDTIX7 (ORCPT ); Thu, 20 Apr 2017 04:23:59 -0400 Received: from mout.web.de ([212.227.15.3]:63111 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S940277AbdDTIXz (ORCPT ); Thu, 20 Apr 2017 04:23:55 -0400 Subject: [PATCH 2/8] clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe() From: SF Markus Elfring To: linux-clk@vger.kernel.org, Michael Turquette , Stephen Boyd Cc: LKML , kernel-janitors@vger.kernel.org References: <94b24eaa-c5fb-80ea-441a-883989d14ef5@users.sourceforge.net> Message-ID: <2a7dd521-86bb-09b8-d49d-7518b51094ea@users.sourceforge.net> Date: Thu, 20 Apr 2017 10:23:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <94b24eaa-c5fb-80ea-441a-883989d14ef5@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:oJXxYuVODq61gECGhv7lpsGXHXdNcW5lGCPJZxIl3iQxEJGIvCD e5Uxx1t3Qm0ZDbw4EJUWDlD+iJgmC6uyVQkwFhYXT60KCsAJogcLDV0ZsMmaIoLPBp4oreu FlF9r0uiTYnIXF+aSfo+rAtnKKTGLGPFbhnC7ajs0Wp5DsQhv24Iakspz4Dw/V4vvE3DZGH FfMb5Rir6mKandnEZVJsw== X-UI-Out-Filterresults: notjunk:1;V01:K0:DIhBRj9B4cY=:Mf/+sMsrvYDhMBreknuH6A g6pHHyU4NRJDBdHBZ5ReAyU+OfUxurXSieu1YfqgTbqzcrDqCvY5S9w563GUTuYN8YwILi0Np fTkCdxARWJHYpOqefMZv9nx8YpJ5v1uiHJZ/ncMQuwd4kPVNt9/z4Sh1p8ErIpYVMmrZ5zerw +16JSru6A5hhK+d8Red/yiBJQP2tHBdS+KTB4TdHqFoXluoiTIXkQP7ll7J67SGQ7RzFt3N7A oiCOkjPdwIPRgYbE82ciNJeoL5ogOeF45+K0OyXbjcp6pKrEmeb2WzvYp3IytnPMdUtaKWxjg odVKpulyPRTsQL4nqiTTbvI0gUUrMfYnhKA6iZiNUAzIBgYreSW7W5teUfkmLjxBnIVfTMsG6 AcyRkyiZTmQVX3qQck8pTVR/1dJT/pHevcRVvvQ2mmmqttwzb3mzXBxWz5aq81JwDeH1XIzy0 umQfmbkZ/BzmF12NkUoF0RTn6G2GoU3ExgbaWlIjZH7/cx79qV4+0XZ0wAh3EHXIRjhO7U6uk jaRs9rjb83QZFYrlo2THkHeM7S1iOwrP8vrxPGgltuFgMN4EG3ApWgVVNXV9djxNwl+UzGvkz d8mcz1MrSgmkPAsEbTTjEJo4SIrMCnIxR8RHggGQrZjdBbEIl1ig60FQo9bcXovMs9JVnq1RX Z6sPGNHTGVX8LXm9TAw8YXu9qpU2iUiS3daCp3SNfAN+wpljB6AP0dKtMh58jM2owMPuxJFQ/ CeeSHXMwnHcJFQ/rG7alfwfOWpCqK1JlREc5R0oLcuBfoj/7FuCAoLxP87/FydcrRxqsjUxat jz7JmHg Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1145 Lines: 39 From: Markus Elfring Date: Thu, 20 Apr 2017 07:34:54 +0200 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. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/clk/clk-si5351.c | 4 +--- 1 file changed, 1 insertion(+), 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, 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; -- 2.12.2