Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751908AbeAPM4L (ORCPT + 1 other); Tue, 16 Jan 2018 07:56:11 -0500 Received: from mout.web.de ([217.72.192.78]:61503 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbeAPM4K (ORCPT ); Tue, 16 Jan 2018 07:56:10 -0500 To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML , Laxman Dewangan , Mark Brown , Samuel Ortiz From: SF Markus Elfring Subject: [PATCH] mfd/tps80031: Delete an error message for a failed memory allocation in tps80031_probe() Message-ID: <4234ad34-d531-e339-3c52-34f1307f7572@users.sourceforge.net> Date: Tue, 16 Jan 2018 13:55:55 +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:PsnZ55/7+3U7PDxI6SARGsRMr0ch30XgWlH0f8/L6sEN7hwqz0/ WcCIX+t+KSBgDsT3uNfhPu6PzbDiYvylEAdQ5yKhUxvsKaKi2BuzB53PwALGAlihcvIKTPB lBpE4rzAzYs8RBAeVsskWezVzbG01R5z7vUdWssvkrs/PScjDatisMdlSulcFpCzHss/YF4 5jaSiVMqu9utwqgFk2epA== X-UI-Out-Filterresults: notjunk:1;V01:K0:U+2vHvVUreA=:uMZJhsCEDgfTGmfh/mvaJz 7EEbpiaPm64WZ3rU1B1YZ3Dua4aAbjDDzpfuSZ/10Yn9CCFdde/s1/6gkdVBWBWcuBv2FURN0 /wOGfSisFFeA2o0PvqkoNkEtONq00Cx9Ea7zWj1W6edQKOvvj4PT/QV8MhVoSEV+Ea9O8hFQ6 iv0SBh8/9p6xEhM70FqEV4rBLR/qG70MH1lX+RomvgcGoNZD31/1f8jscMREE6672yv5AqcDX 03z02qi0Ml/h6tjdnz+Jf3l4sMEOSktmykwV3RKCm40jwR2mC3MvMZvmR3GjhfQ67RoUfUMsl nOh7psHSY6rqQXVq6zcKd8bXcnISv+YX0HyLEIldQg1RAjLXy4D9JRhdpGrcXzbtJ7nYqHVEe pUJd3guDCILj2mpQRIs1vVj1zb+tOFzBsSEQEBahG8IRo2QrS6X5MXl6ZCYn5WbKUA85NdlVh a4dYJ+N4EPMHxb0yuRkm9UYuxGHXPya6qDgUCSo9pCe1M6L9DLl35jUIa4FtUwhYxNIIo6ukm dkkbbEjDwzJNc/TlfjIGPMEtQLDyfE8Qp5iB0tnj55fA+iHcmDaYG64ibHgqj3R9P1AeAPKCD FkgXWxs6ZIBhnBYEktwYSFrYAx8ELrCJRpIjInT3gvjWhhbKEUmnn1zUHrJLUM40cUvIOr1Lk +0qSfmPr0wH8Lh4DYgO7lWdbhnmvjbghWBitRIaS3S1UFAao1zNdvo+LAi9MEiBMzZx7g98d6 zfyBaWBC0fhm8pl9+UltmQS17SfBUNxn/dNntxviUKnRG4IkGadwaVx3VLgXQZKHchzcEI7h6 rRfMO75Nt9NMZGDFAEYSAa+CFir3gIsvYfC4EeYPiAb0cS8hDg= 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 13:43:03 +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/tps80031.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c index 0812df3b0d47..608c7f77830e 100644 --- a/drivers/mfd/tps80031.c +++ b/drivers/mfd/tps80031.c @@ -431,10 +431,8 @@ static int tps80031_probe(struct i2c_client *client, } tps80031 = devm_kzalloc(&client->dev, sizeof(*tps80031), GFP_KERNEL); - if (!tps80031) { - dev_err(&client->dev, "Malloc failed for tps80031\n"); + if (!tps80031) return -ENOMEM; - } for (i = 0; i < TPS80031_NUM_SLAVES; i++) { if (tps80031_slave_address[i] == client->addr) -- 2.15.1