Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751401AbeAPJnh (ORCPT + 1 other); Tue, 16 Jan 2018 04:43:37 -0500 Received: from mout.web.de ([212.227.17.11]:59825 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751225AbeAPJng (ORCPT ); Tue, 16 Jan 2018 04:43:36 -0500 To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML From: SF Markus Elfring Subject: [PATCH] mfd/tps65090: Delete an error message for a failed memory allocation in tps65090_i2c_probe() Message-ID: <298ee6b1-c14b-e794-c800-f2aeb6b42a53@users.sourceforge.net> Date: Tue, 16 Jan 2018 10:43:32 +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:IP7KbelzxjSCMFymEmC9nY9+d5100Zg5xBhysSxQHWnI3SnCX65 B6yQXSnUFjcMiror5TM2B2jvocmiCYGLBrHtu1thDo8E+owK2KMI65qJtMh0+6k0Jxk8/jt GqusPhWFRbw2QMFSiSduXbHB/xYUcb8j2AFPh4JObBOtkwzm0uAPFaif74BMi5FntzuLeTh EodUkJaPRPfVvPD1kVdqg== X-UI-Out-Filterresults: notjunk:1;V01:K0:9VE/otX6nWg=:OhX6VMN0i0bCFgwhBidNHP nHUYH2liZ/zEIpJK6VnJn8DxEmHDu1W2B0lgmu+X/q/Y5QtXuYIYSrjhDBRT2+jFjIfyof1DE pjLCM8sXWroZKA8e9m+Ewd0VCMGxFwujILyWXjOb7FClZ2IounaXE4QxBKgSHgfuXCgOmxoEr 1YpR4t+CT8I8dcJ+JS/yRzvB9peVKA4s6LKnxYZlyZUAhd7et0qObNgF0X6NqkIgwiokCO73m MfWXXFGs6zL6KDuxUiCbBGQABX26OzwkoxTapK7mE/ZmUcl/VButGAH/dPbYWW9mJnWbOSoYm MUirgfgjy31nbD9nW7YSUv1Ry5ruH8ozxisdlZoE3nX9GU6EL9HXLetR6+PnmbOkhLLatYpYe /z6Gmt1LncXOW6abQwAA3jniU5gc6B1rUt6ciwlcFWjo25hzIHt3ow4keOXGYMG7qaE7V4FWu JyvWnw6nCAxQRJh4j/ucWkDP0oXQjLjmXeZZ1NbhLynDBbuhGUwcc4us+YCS6IGg8/VrFy4U2 5z+Qb6cZ0nBtaTaTEDfGnQIo+XRJc5nifAg1rHR6eAR6IZ7o1Kk1F1IQYw1YsIjjvp+0dz8+C Vg2yi4uwvslWQN9U5EADq2vWMOD5geSdCXd6seKbf7ji+DXGSI9ck6KR/k9+Mzmb8W78RFANQ d4E98+YooEjFCBjkFo2l6tD6Gg5xMv6Ksgc/cSSjXSD03JK5CApiohpgkXh2mM1oxyH1tnHnV sK+sAz/pgt0qdeWdhvP2xnJJ4/JvM4H/HhzDSULs4dhgCUvQTBEPqyHhUtNWuZp0RUmoCpN4j I47RNsfRr7GrK2oyMu3PrNl9pWBUz65UqaP3zPWw2xZnjtdRvo= 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 10:37: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/tps65090.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c index d7ec318c40c3..f13e4cd06e89 100644 --- a/drivers/mfd/tps65090.c +++ b/drivers/mfd/tps65090.c @@ -192,10 +192,8 @@ static int tps65090_i2c_probe(struct i2c_client *client, irq_base = pdata->irq_base; tps65090 = devm_kzalloc(&client->dev, sizeof(*tps65090), GFP_KERNEL); - if (!tps65090) { - dev_err(&client->dev, "mem alloc for tps65090 failed\n"); + if (!tps65090) return -ENOMEM; - } tps65090->dev = &client->dev; i2c_set_clientdata(client, tps65090); -- 2.15.1