Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752546AbeANVS4 (ORCPT + 1 other); Sun, 14 Jan 2018 16:18:56 -0500 Received: from mout.web.de ([212.227.17.11]:52686 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752001AbeANVSy (ORCPT ); Sun, 14 Jan 2018 16:18:54 -0500 To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML From: SF Markus Elfring Subject: [PATCH] mfd/janz-cmodio: Delete an error message for a failed memory allocation in cmodio_pci_probe() Message-ID: <5a66d47c-317f-1abd-7eb1-3a4f74843c78@users.sourceforge.net> Date: Sun, 14 Jan 2018 22:18:51 +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:kE7zRl18zgAi2o/RuaFNCNTH7PhchXnqqFa4jyllO8mL+o+0vhF kIeZZWe2R2z1H/IVJap5wJu4CgI+6AOPyT4mh5+gr8BHF1VoGTGB1BZCNVIZ2xl3UPKqcZa 9i4A5x5seoRyyt4XI302GF3L/7Wo8uY37ZENWA3BgUHh+y7xsnTTAHqerPQw6qptDTgGoeE 73HCkr5I8YETBKaqthE8w== X-UI-Out-Filterresults: notjunk:1;V01:K0:zslmt30kTdU=:mWf5MHRTgJaZXSfyoC5Xbo 9CRj8rkvJIEyPU9+CrG1nmu38g1CE6eR2GpC+JDj1YTNRW5AXEjMldmpDMRjYnBzH/7gyImIR aVFSE00lanLQzlSc35NrbRYx8zG0QJRqDq47LVBdnhvX1ZFIvaVx0VAeNB/hhN8Dat1xZZjnh e7c47v44xzi9FdfWGJaTD43fqOOIQxeiS50RCDVkhnS3hAip+tc/9y7YMSfmufo5kIu0JEipr QOcnuVK/P1+TydsPL/Rh5w2ZgzzTEM07u52NrXFZl2xc/zqrZdW1tcD0GT4PCGra6+ht7k6P4 A7x6AQy4ac/4uoxEAAJqDqwvaomQMnU+dR/TxYhb35/4iOoigJ7CQL/IO0/3UOQRAhb998don aXXk+S0nf27eKYfp/6BJkW77cCwqbqTA9UPxawRl7KSAVAswJicy7CIBIeiX53n5XAWpAdYjf si32SbhchG/IefDfhMu7g93tBnYHxQayofS6kXvFYRv208KwgcjRkDmgviYebxjTxGY+8OpqR OVmvuFFnQ+EfgPbIFWCVQugYP4ib6QYuxw9Cavjvq3soKQLTHcucepGMJKl3E5eYmFkU683sX MMbbbJRkWogy3s/6bh85HxSTnEtWFyE4YCabrDopOsIPESLyLPCZQFOGoPrjQW+x2QoWa5IM5 Pb7sjgOfJAZyERk0F9bXmACPRlPGHKhbyfO+vhQNn5pu/pUhyrz6wfT4GMltOfi2mc5FRmauj 5mbhjvY2udZzIbARHVcOQM2Tip2Lud5/HblbVL7pheAEYnLwRL24aj0hpxBPiGdl0EAMeFeGO VuGcIxGAaGtK18Te2XOsoDJwB+Q0+XUJAs3qs7jLQiKEqc7jG0= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Sun, 14 Jan 2018 22:15:09 +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/janz-cmodio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/janz-cmodio.c b/drivers/mfd/janz-cmodio.c index ec1f46a6be3a..317a47ad5bb7 100644 --- a/drivers/mfd/janz-cmodio.c +++ b/drivers/mfd/janz-cmodio.c @@ -183,10 +183,8 @@ static int cmodio_pci_probe(struct pci_dev *dev, int ret; priv = devm_kzalloc(&dev->dev, sizeof(*priv), GFP_KERNEL); - if (!priv) { - dev_err(&dev->dev, "unable to allocate private data\n"); + if (!priv) return -ENOMEM; - } pci_set_drvdata(dev, priv); priv->pdev = dev; -- 2.15.1