From patchwork Fri Mar 9 16:28:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10271141 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 AA4B1603B5 for ; Fri, 9 Mar 2018 16:29:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A936A28BDC for ; Fri, 9 Mar 2018 16:29:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D47629E2A; Fri, 9 Mar 2018 16:29:02 +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 3A62428BDC for ; Fri, 9 Mar 2018 16:29:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751151AbeCIQ3A (ORCPT ); Fri, 9 Mar 2018 11:29:00 -0500 Received: from mout.web.de ([212.227.17.11]:45713 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751207AbeCIQ3A (ORCPT ); Fri, 9 Mar 2018 11:29:00 -0500 Received: from [192.168.1.2] ([92.228.30.253]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MbyUk-1fCXxn3CPW-00JJLI; Fri, 09 Mar 2018 17:28:57 +0100 Subject: [PATCH v2 11/17] mfd: tps65910: Delete an error message for a failed memory allocation in tps65910_parse_dt() From: SF Markus Elfring To: Lee Jones , Tony Lindgren , linux-omap@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, LKML References: Message-ID: <88eea608-0242-ebcc-5542-8ab9375242d2@users.sourceforge.net> Date: Fri, 9 Mar 2018 17:28:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:AB8UyE0J0Km8pGEjFsdoZNL1bJPihWLmPZxjv/l39LqMq9248Kb ERZ0sbniFcp3V0hfw71CtY77vLK/LL0PXxnI7OIdMKlf9xtQFkfbMK6VM5R5Gd4AGjduF/1 F/9m+v/DMSauUjQX4GK9luwQPk3LEZFDFuaXlGJ6zRigcaXIUnwFZTsIUtWQEJm3D6vpNQE 93ODptD1eEP0Z12F8TYfw== X-UI-Out-Filterresults: notjunk:1; V01:K0:z7XxsgucMaU=:nRYHkqkljlY8XCkMqhfvT2 ta2jjIloaakCaLgCMzmipeP2haSS8y9vD4847QlQePIs7bXa3WImwAq1eDLtFjZlQ99fl7mBK V8e0fe0XrTzd3AIiER/wcweGPS2JxxdCRGloBDR4BNZZnJUrOMKPC8L/jvoQNjeNy1kjDAziz DEYhc2GnWxENI9FLpORBnL6udWDWqelkqIXSdrY2I3FW3xwoFNVrucsyFNS7g2XO3R6vZS6Xt pyzTyY6nJ5RcuGZJI/zLPKfyWknxTOY5pZla43U2G6vb2zBVh7pqZDEGOpkPAEXZAxyp1YTJj SW9XmPcHAOe1Z8zTPZaRza9gXEZeo1lNZrtOy6I3to9bgcjsH5Anvh5gwutQ61vzzjpIbpBQ5 ELtT1Oq85ORdLdQY4VADF4MUpgcT7I5kpYXFmk/czxLIjBrdEFE40KUGCcyX/DzgeUhOroxcC CrwxmuncC+ZvHa2e8KLECW1Ht+3KUnjtsGNVmcXypgCOjzSQbLKRy+um9Kk5qRryUrFMfcoy4 nNbvLWsyE9onaeobSnEWErbL3xeBmhYwMpJL/fgzEBV1RYuA+vXltXPJQcrQtW5cIVHTb8uy/ ywijcAKHCbhyA0gcHrBPeOOULjAAwQZDBoBXLAbJEegcuHRGpUltC0WBFbTEWTu5SS0jQg16U VfZcyICTqk2fcTVdwzbQl/SmCe86KPjcMcRk9CI9pcf4eZA76PcykipxAYpY50YmA0S8b85qF +lQ/GLnyH0JdKTpAwLF7uazP0DiTagJhVtjvcCg73WVSCN5Teg89RTiyNp1jClIkp39PPo+ye YByka9HHJcE8lTyIP0cM7pYqwpAEISmBSVguSlkfHl4UMKd2Yc= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Fri, 9 Mar 2018 09:00:59 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- v2: Lee Jones requested a resend for this patch. The change was rebased on source files from Linux next-20180308. drivers/mfd/tps65910.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c index 8263605f6d2f..555bd394efc3 100644 --- a/drivers/mfd/tps65910.c +++ b/drivers/mfd/tps65910.c @@ -395,10 +395,8 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client, board_info = devm_kzalloc(&client->dev, sizeof(*board_info), GFP_KERNEL); - if (!board_info) { - dev_err(&client->dev, "Failed to allocate pdata\n"); + if (!board_info) return NULL; - } ret = of_property_read_u32(np, "ti,vmbch-threshold", &prop); if (!ret)