From patchwork Thu Apr 20 08:23:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9689857 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 12A63600C8 for ; Thu, 20 Apr 2017 08:24:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 006E928448 for ; Thu, 20 Apr 2017 08:24:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E714B28459; Thu, 20 Apr 2017 08:23:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4056B200E7 for ; Thu, 20 Apr 2017 08:23:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941662AbdDTIX6 (ORCPT ); Thu, 20 Apr 2017 04:23:58 -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 Received: from [192.168.1.2] ([77.182.247.81]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MVtqS-1cU0bd1F9M-00X2U9; Thu, 20 Apr 2017 10:23:49 +0200 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-Language: en-GB 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-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;