Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1954289AbdDYU26 (ORCPT ); Tue, 25 Apr 2017 16:28:58 -0400 Received: from mout.web.de ([212.227.15.3]:55425 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1949853AbdDYU2t (ORCPT ); Tue, 25 Apr 2017 16:28:49 -0400 Subject: [PATCH 2/3] scsi: ufs: Delete an error message for a failed memory allocation in ufshcd_memory_alloc() From: SF Markus Elfring To: linux-scsi@vger.kernel.org, "James E. J. Bottomley" , "Martin K. Petersen" , Vinayak Holikatti Cc: LKML , kernel-janitors@vger.kernel.org, Wolfram Sang References: <75622f45-f46c-e52f-2b9e-6ff5ce32184a@users.sourceforge.net> Message-ID: <3d355c13-159a-2570-9ead-af93ad95c210@users.sourceforge.net> Date: Tue, 25 Apr 2017 22:28:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <75622f45-f46c-e52f-2b9e-6ff5ce32184a@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:rnIiTfhVU55xsdUK8NrAv89hWKetMqhrBy33BJM+UsreKv0HWEK 6sj1k25wvZ0cnAkwjiQSyxCsJERTVWO8TrvjdRa04SJmXwAGHbNvYbN6x3azRxjSEtHNm5s Rn452K3ZD8Z6LW4CLrkzzyHv4HtiQ4576W7H2dtqzAlo4vt7LE/dmF1Ip8XVGFmkA2Q1QH6 y/o9PsxjQMX7xDcIFtTIw== X-UI-Out-Filterresults: notjunk:1;V01:K0:uM3ScaJ7bPc=:uc8MTFVgSeGKsVFJOIpWvj 1ZUgfz8Vx6rcLyJyTiGB1r+RAioymsaXLCrgwIo4JKnNNSgznD9Gq0l0hEdN+SKg/lalZxemM Q4M6VbqGbvaTt3jcD/ormIAxoN69qLboeFM7JM2P9wq2iyJeXTsfL0DtXGGZv1lnBUg4sFxpc Thx/Gr7VPSF5hOPaWlQ/WgzY3DeKecrEqm5V6nQf5wVHJrencoRM3gvKODBZpIIVeW3aEeh6v RgB2FayCxLppxL5zCLNw3HmB9aUamiPq5SWPTvF6rVK9VQ0O8NR9QKBV7de/JgQOkpWUoZ3kw RChCrsdUrmXrz5cI0uSkIYj3JpXXvp4gDaPo0DTB0FndOYg/kB3zClDP9t0cVzzo3jphS3JpS mk0eoyPEij0pqlu+bfcVzKaO1Uz8KVbuzflEUqBAUglSC5bQghbGbWZ+fIcKza8Z+24AOz5yS Dn0AtzoXdpkhmtkwUNWCKtvHFLRybgAqTLeXQjztivC2AMBW1WHAE8HL+1XWViY8rCGUuNV5L n7jSvkK2CMyn63gxQDZ1tSFrHP2veC7FoOnWsp/FDsC+KxDZTwdmR9194OVwUs2qxJbW1rxV/ gD9HfOuwWRJpi3vblIhOT6e40pc5n4vxtgNriXj0MsvashWEih6AWNs4mx19k6c2H47FoMcyn KRynnD5Jiordy3p6feyrQKRbKfZGymVg01AMcgC4uLiI5afHXgPjaae6RdUKwjKoA584ZL+eC bNiy6Kz6mns8KoMQW9ZiM9P+RiBziB0CtH+49buVpzG7EW+sC6X8af0rsDMGb9sXncjaHtPVZ 9aUYGQc Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 930 Lines: 32 From: Markus Elfring Date: Tue, 25 Apr 2017 21:50:43 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such a statement here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/scsi/ufs/ufshcd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index ce385911a20e..5216e33e61a3 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -3274,8 +3274,7 @@ static int ufshcd_memory_alloc(struct ufs_hba *hba) GFP_KERNEL); - if (!hba->lrb) { - dev_err(hba->dev, "LRB Memory allocation failed\n"); + if (!hba->lrb) goto out; - } + return 0; out: return -ENOMEM; -- 2.12.2