Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751283AbeAPIS3 (ORCPT + 1 other); Tue, 16 Jan 2018 03:18:29 -0500 Received: from mout.web.de ([217.72.192.78]:64973 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750822AbeAPIS2 (ORCPT ); Tue, 16 Jan 2018 03:18:28 -0500 Subject: [PATCH 1/2] mfd: smsc-ece1099: Delete an error message for a failed memory allocation in smsc_i2c_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML References: <978023d9-01f2-3a16-5eba-e06b8359cfc0@users.sourceforge.net> Message-ID: <6be526f1-cf39-9fa9-3508-ac75c9751986@users.sourceforge.net> Date: Tue, 16 Jan 2018 09:18:25 +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: <978023d9-01f2-3a16-5eba-e06b8359cfc0@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:aNB6evn4xsCVfgYTvrkiIL1ozlgkyfWEwWw3ZJv0udFFZxYpBgA nchQc58TgrzRr3doAjsOInJroDfSjEN1+hyYwoVoxHl7ZjADuSPJO2BIe4PPnPVRpKu0p9P MnMkmBIPbIFtxXzuh0+eetSGVxtPShPqqN0s3xOkawivmb1SV7u2KV1FwXHTtxtgYgfC99f JC5/mQu2Om35mBDGHWQNw== X-UI-Out-Filterresults: notjunk:1;V01:K0:qkq6rRgp6Jc=:S3mKd+4/YrTQ8HhjHS6yqE ALzDiaoNdEUiCUGfKCS2k7bZh4bU/D7cKxViN5qdRA+y+CID6+mkDL+gxa9UbaJqkd+hJaa0k vzU+dxMUtlamqudBD8fFB93rj73YZ+yGjOQ2a8dENM90yAWHkT3THHIRPwkoz8IsBkQadwCWS eYK7+4Z34LWx1LQSBmu7YntTRNBSsUDlgmg5eYbfajuowKiEN+srsQDJZKax4ebZvVzysB8MR aCIVQJBxnzlgrnvkAiAcMvpTxIpv3DFEHemDpR1hMj4mdtAoybtXK0QqjnzaA/yQDmvANeINX V21NWPYdWH6pdXSGs/8LPce1X+7Y3ZFaDwPo/V5MIOltNYCugjtkw4jeuY0xVo8qthdUoBpY/ bNy9YSkhPLhuwHMM+8acY+74z6REHrWdgkDmXIGMCoDkeKzgLRZ5RipFwhyhCvOsqKxaAOPg2 vNlpPwYDxImsjgRZeyaCnZC2sXz8oQBlKNW7O4Ukqrze5LVj8Yt2n5mmYxC+ZqnD28+DGIudj SwS7SeAq9aMKDrFxTfdW4pJOcMnUrEq5eVPCv+DEiGALJNgYNXmbcTpNOELaesxDbvz0NoETw 9OPf+6XH+NVvgKwVhKxHoPezyZ87tpSNcRRMFJle3DadSmDAfg0mASI1dDC1HGlG4YoZdJqJx DSZz2AA8ucqYUcF7GgHWijB7XaophY1TAaO8Ot8gj0QDl1URpDlGHYr4fi4mEyLQxvlJCohkx vTf1VUTtjfhtIzzkfQf4naziEb22/W3NZjzZ3WMlDWXIdWNBjJs84N85/N67alPHmiXca8odc 3x6gcI9UWf7nfBugsEj9jUezBE3XdsG6OXaZJ6amoiUEpTJ1rw= 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 08:52:27 +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/smsc-ece1099.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/smsc-ece1099.c b/drivers/mfd/smsc-ece1099.c index 93a8297de52a..b9d96651cc0d 100644 --- a/drivers/mfd/smsc-ece1099.c +++ b/drivers/mfd/smsc-ece1099.c @@ -39,10 +39,8 @@ static int smsc_i2c_probe(struct i2c_client *i2c, smsc = devm_kzalloc(&i2c->dev, sizeof(struct smsc), GFP_KERNEL); - if (!smsc) { - dev_err(&i2c->dev, "smsc mfd driver memory allocation failed\n"); + if (!smsc) return -ENOMEM; - } smsc->regmap = devm_regmap_init_i2c(i2c, &smsc_regmap_config); if (IS_ERR(smsc->regmap)) -- 2.15.1