Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753209AbeANUm3 (ORCPT + 1 other); Sun, 14 Jan 2018 15:42:29 -0500 Received: from mout.web.de ([212.227.17.11]:64951 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752988AbeANUm1 (ORCPT ); Sun, 14 Jan 2018 15:42:27 -0500 Subject: [PATCH 1/3] mfd/abx500-core: Delete an error message for a failed memory allocation in abx500_register_ops() From: SF Markus Elfring To: linux-arm-kernel@lists.infradead.org, Lee Jones , Linus Walleij Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: Date: Sun, 14 Jan 2018 21:42:06 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:UnKQ7mypavWLjfZuCxX/fARtN9HiCRsROzYrCkegTAvr+2OKgVF 0pSSW5mhbAYJdBmPaP2/Xc+gDD1MqOGg18bhU22WZwi/BdBNY6168M0gfi84Rh8Pe8hRFtl yKQVu2PJ3O0+8aHD6EZeEIcKc/psM/FERcJ0R8Tinl7Cqo5kwCqQrI53i3SLGAsqJVzbQtn MSu683FQ9DmUvy06MOSGA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ggqibAgj4iQ=:PzM+G1nvh4+TPiTuiMcV4U OCTFLbYIMVNXIBCDRweCXxn33y8ML0Juelt095wDknhsDWHqMSgNe47/iOq1EyGHOhFKdQo6n g9wpmd3EDPCt5ckrpoWcfzB/egkk/McUa5mEkjr5xd3n4wS54wb2+IwBfk4e8wSL9KZsn8vA0 vu8KlDyUerCu0qItP+u5bAaMn3sauSvSMaPbxj+0ougZUt5xgFzEiS9Y/AQ7kYnOwHJqqFQ1W wIho1dggBlBTL1PVqsV2knLKZe1+ENBQN1N3nRjBOrBQVzC+B/to8+Oaw+Ir6IUVzruowCuQo 7PWgErZtlLOlkkbNnB3lGuZvdJ4xS6M4+x6vak4wv5b/wjbSj2oVwGSq37dhAJPHn0hwcx28A GKm7+JuH8gq9Q8PmizXqxqQLXAI2j7Cg9fo2OYynMm15UuUOEG1XdPqI1UEvLzv5ytt75jNYH wT/uFEnm4czRYjBTx8VMNvOn5vkaSkfHF2PDCdyzg3ZOtwhM1OUbkql645XPrR0UNXGlbRmDQ UHOPDQTRZwy+OKXrjs8OktTcF7vKlWGJ68zuJveIGyClzHLNiR9DSp15OE56jAGxHhvKJxjtj W6MKx//hlSm1r6AeYIlL71zfddhyt880Uzxt2oltd7keZueamQ+k3lfCa/nBj7GSh9OzR2wKm BuYZD6k1gIc1ELcmckLLXfWuCSzMqnNGjJF7QFIFuTK4z+r/OEtUAmqC5C8cVMMhp0StAtW22 tw2a71E5MOw7fEYYfLXUWjBM8KzNVf4T8f1p4bkPBuvdfb48f/k8+rcCsEoxozOtkSn5N/6aY uAZSCo5H5MXI493+ZTOeB+NtvEvrW+zyNZEMFWWaCkdHid/O1w= 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 21:08: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/abx500-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c index 0d3846a4767c..c8c9d41abcaa 100644 --- a/drivers/mfd/abx500-core.c +++ b/drivers/mfd/abx500-core.c @@ -40,10 +40,9 @@ int abx500_register_ops(struct device *dev, struct abx500_ops *ops) dev_entry = devm_kzalloc(dev, sizeof(struct abx500_device_entry), GFP_KERNEL); - if (!dev_entry) { - dev_err(dev, "register_ops kzalloc failed"); + if (!dev_entry) return -ENOMEM; - } + dev_entry->dev = dev; memcpy(&dev_entry->ops, ops, sizeof(struct abx500_ops)); -- 2.15.1