Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751503AbeAPKHq (ORCPT + 1 other); Tue, 16 Jan 2018 05:07:46 -0500 Received: from mout.web.de ([217.72.192.78]:63072 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbeAPKHo (ORCPT ); Tue, 16 Jan 2018 05:07:44 -0500 To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML From: SF Markus Elfring Subject: [PATCH] mfd/tps6586x: Delete an error message for a failed memory allocation in tps6586x_parse_dt() Message-ID: Date: Tue, 16 Jan 2018 11:07:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:V9zfSJZNUW70rTweXnr5VupYlVjjnzcXC702A1aWSXb2ddmtBHQ rz/9Y21+DEUr4UKbDtWgnAX0y21ufrk8NcRy/9wUIHJFCcVO9gR8YvTxLTnpRTnM4+EvTIu ourecqKaXd43jwig7MWmi4i+8sG+XWt+Msr4ziW27USCGi2wKtVXMVbtEq0DDpZ75a3V9FG /GpfO5sVI3fAdwlamjp2Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:FfGqcBbHcO4=:ROjAYe+BooZ9ev9rLmXpZt kspZETHHLw3sIz17uEPzgrWa7FTYplmqtrO3XHm+ttebLNeMt2tMpJalSw6vqYUPIzl8A7j38 oXoJFWMRXUGF5gxSMUZsudMz3Mo4medu0aaq7JPEJBtcZ/WxvN06y87p/eZSingCZXZyKB0tj Ethpl+q2ayuwqMuQaVLjtlzK5PF72Js2qhKmSqvFZVKxuEC9HPr7za+wxJki9SHmwgRJ5K8Bp 4dAj6VcGruEG3CJv+zGIOkAzinf3B1WD5owvCQFOIyDffM70glnt5b0SagGsHfS79nEVex9OP PdTzOILZVUias0+YJuI7D0hRp6U+IQTtSCm2x4unSXo003jUViFiCC1ZCRvBH0wCAgy7qDgli ocCbozb8LJTNW87/hMCo1OaN90zG0Klo0ztjxIl/+SoWW9RltW0vB3LnRtU/iHHnxNQq6GD15 /QrR9D5kThRfAY+MJmXYQVtR+kKZjI/oHXKdVlUm6XiHxIWoWRltdVjNU2JNHFLBYD+P/W/Pe UG8IXiisKuq+0WlyzYJ12WsF/jHqkwbGgsRsQRXtLySpJB+JYAA8AwkU8jSfZ7JWJu+CDGhDE NT6QU6sYFDt2wi9wiiH8XKdw1ARlADKhSTJuFns5gC/wvmDk3IoLk3fLfVvAvAK+8u5fQiFcR IeHGSHNaFb7i4pQHsd4J2C7fAK1kM+8x2nHRcGRNgr4Iw6OMhcGXZN4tQBGAquvMdYFRxl8SA cYa1mfp7UBrOHrD4Biz6QF2pw/GukQOMnfWow2gJujRTurSBzFIKP1pp1N9kHZdo6GqILgo0d NWoEbTlsrVMWxYhs48qVSib/iZfpBWieLhb14wzAs2PBDw0a1o= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Tue, 16 Jan 2018 11:02:56 +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 --- drivers/mfd/tps6586x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c index 5628a6b5b19b..b89379782741 100644 --- a/drivers/mfd/tps6586x.c +++ b/drivers/mfd/tps6586x.c @@ -423,10 +423,8 @@ static struct tps6586x_platform_data *tps6586x_parse_dt(struct i2c_client *clien struct tps6586x_platform_data *pdata; pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) { - dev_err(&client->dev, "Memory allocation failed\n"); + if (!pdata) return NULL; - } pdata->num_subdevs = 0; pdata->subdevs = NULL; -- 2.15.1