Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968056AbeAOOBQ (ORCPT + 1 other); Mon, 15 Jan 2018 09:01:16 -0500 Received: from mout.web.de ([212.227.15.4]:55162 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968028AbeAOOBM (ORCPT ); Mon, 15 Jan 2018 09:01:12 -0500 Subject: [PATCH 1/2] mfd/rc5t583: Delete an error message for a failed memory allocation in rc5t583_i2c_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML References: <681cd296-5d05-cdf8-f031-162d7f837b36@users.sourceforge.net> Message-ID: Date: Mon, 15 Jan 2018 15:01:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <681cd296-5d05-cdf8-f031-162d7f837b36@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:CGvnE5LLjuowTypqVowPr9CSLTQGBZvPgCenrjF58snFddL5ZyV 3Yxeg4qXOP/ksUiocmHvp5ylg6SZwESwZXYJAs+nIUKC6YhRZkhc6qKb2weGuqjSDFvBeO6 rul2KMszz/p3H9exphhC2agebQqYDfdUFuYWbb0i9oCehco6DUFpY4L+ig7gYr+jY/VyAgs 7Gu1/094VYidH4etCVz8g== X-UI-Out-Filterresults: notjunk:1;V01:K0:IAEiEV4FoaY=:dnTGbMTOY9092cYtqQsxk2 qagoN6EbnRUUcrd+ZS7y1j6wDphuWYi2yIoNYe7h65155hwvGriA8ZdR5xx6zQZachq7fdBw1 mgOFNo6KMaErSeTckAdT8noLnveqz8rpYfgpsfKCDKdgNbos0MitoYXWIlutiHXMRIsE+i0cy /ZWX4QUJkQzjU4zH5jypdCM/wVhYkwfCHS/CZdJUP5ja9/OTxluloFIf8DHHWy0UCF8DRDxv6 diu2MO5iGS03sX5TkUCLC07NAdvJ6D4WV4UnPrEcDB5GCcySXMxCztt1653UMK7ozdlhp96N8 MGWPKDON8syhCySgGmpmgXiDQByv5xvG5MUmCdVlzcqIwAfWMCumP7yRR49J/ChOaQzzuRNza ZY/RSHZSxL4iCBD/mCbgTk2ocCNUnPo2L5v9Ka+O2/i13jW11BYBN6h3uXMVHgb9Pc6NjFCBB /k30BzzQNRUT49f/D4JYmsJ4IoSOoS2J/+dCOluYQF0LOE/fwkGJKNsM/geF0OOKy1ysz+bIw MDrri88uwdcCOzt8wvYRI5hnXA4c1v4iXcDgYrDzLakMjIQUiIq+AYHAk6dX16oy7I/LdFGdU PsQoCVGSwNf+hG8ZIg/5RPrOuQOvohkCcslozk1lpYpfUvYbSq64/tSfOTXPqk6gLRhUQPUpC wpAvP6v8VWJLaDOWjvTIdplzlqtomIth5YK6dEeybvv/70547reKOl38xZkEIjlunSvOlecub mUwj2yeSBbNJLcUrKGhYZjWDnF3ZwHv2DiopnDw6H/rUJsRsjfRnqSKNSfRrgB6TxRyLWYFGM Z4F9f5rVG/r6RyRvmmLuI6qR2M8Vy6JI96Lsy06UM5Q2i+m/fE= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Mon, 15 Jan 2018 14:48:57 +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/rc5t583.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/rc5t583.c b/drivers/mfd/rc5t583.c index d12243d5ecb8..411dba636a53 100644 --- a/drivers/mfd/rc5t583.c +++ b/drivers/mfd/rc5t583.c @@ -259,10 +259,8 @@ static int rc5t583_i2c_probe(struct i2c_client *i2c, } rc5t583 = devm_kzalloc(&i2c->dev, sizeof(struct rc5t583), GFP_KERNEL); - if (!rc5t583) { - dev_err(&i2c->dev, "Memory allocation failed\n"); + if (!rc5t583) return -ENOMEM; - } rc5t583->dev = &i2c->dev; i2c_set_clientdata(i2c, rc5t583); -- 2.15.1