Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934998AbeAOO1O (ORCPT + 1 other); Mon, 15 Jan 2018 09:27:14 -0500 Received: from mout.web.de ([212.227.15.3]:62749 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934381AbeAOO05 (ORCPT ); Mon, 15 Jan 2018 09:26:57 -0500 To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML From: SF Markus Elfring Subject: [PATCH] mfd/si476x-i2c: Delete an error message for a failed memory allocation in si476x_core_probe() Message-ID: <507039aa-cc06-4c3e-5e7e-07ce20aa7d3b@users.sourceforge.net> Date: Mon, 15 Jan 2018 15:26:54 +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:U38tPt6oRhH3uYDP70le4RIOgedww9tIsxsumcH40vgHxygeIO8 aWxgf5OxZKQ2XFtTg5HVUmT0JCzuly8knBeBdf0DI9pNh3klbKrQIMK7jFLNeS4gLb1Dspa W/HJgr2nUI0f9/dhdOqeDu1VrNc3L63KqsEp3ij+wSP8cQ+6YNEIABl7/N6xbPNnRBN1RLp kF9KYImjhdwyWgRXcQDsQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:k7IeYCALWUw=:61lM+oIOJdnb2MOh0vRKIO V/rpP5otL58y6nP3ZhnQEJb0IK4d1Id2qEPbEIRMpgif66ZkKXHQguEJs9kMJcNkryiF55abw GsbJHib21N6SIRNP7PB/lT+3Vz6QuP8gNu8CokIfQDO173PP1XkgMgoyNwkp4V5LC3AJ+dv/m aDldF8RkXLVDNhdi7NMA1bKIGn8YcdFuvygWKKiHmMa3P+BrztnZ5u4qYk3U3hjcGX7KtPtuc gTGwF6uO+exhhoymcxcQGXOTeoTv4tbI0lUzU/w0tV/G0oHvJcoe4kcbeB+bhkKjGt8h/zSNr S9yzoLA3c8SZpBjLYUWWpyWCw0nKdCVJrKn4vizpmUDv/j9V+WwVmgrLK97d8/1Y4lS39+n5H 3ERhMwjOuXeGV/jCmd6aHLQWDSm6CoMFf26glrzeSgaaw2VxX8zrsiOa3g9bVBMg20aVS+zQQ TAJrOBVx4cPf8uyNl9/HNFUEEBldmGg25+ADLhB9ytJ6jXfnC+8z+/IyjcNZYYgldXFiCheHF YzfoMKB89wPWjv9D8V3CdMXCr8SfoUCcIMSeWIrbXcgpiX2VyJ4E0/PjG/uB0+k3VeyObQlD1 F+rh2l65uWKVnJTe1JW6RcvpwtvR1KDZ1iVW6IPMUlCsTwyO4hoBEkzNdqltaJLd79kaIMj5Q AMk82X3fTC42f3V6PzCHZ6pYHCPnsnzC81YSBT9cB0Dxv1YLLqmNjojavUQK3OO6j6ndUq2vU qA9ycOsChg9eIcP3arw6N2WV6Z94QBABIJZWGcUiV/820xG5YkTVRuz+6a5BF+gsEO2i8OrfE j7KKMq87AL8Lvc4Htz9RKdZk7dFyXuXTG/ZFdPdnE8XfF0yuYw= 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 15:10:33 +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/si476x-i2c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/si476x-i2c.c b/drivers/mfd/si476x-i2c.c index e6a3d999a376..2c5ec93333c3 100644 --- a/drivers/mfd/si476x-i2c.c +++ b/drivers/mfd/si476x-i2c.c @@ -697,11 +697,9 @@ static int si476x_core_probe(struct i2c_client *client, int cell_num; core = devm_kzalloc(&client->dev, sizeof(*core), GFP_KERNEL); - if (!core) { - dev_err(&client->dev, - "failed to allocate 'struct si476x_core'\n"); + if (!core) return -ENOMEM; - } + core->client = client; core->regmap = devm_regmap_init_si476x(core); -- 2.15.1