Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932162AbeAOIk2 (ORCPT + 1 other); Mon, 15 Jan 2018 03:40:28 -0500 Received: from mout.web.de ([212.227.15.14]:58125 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752768AbeAOIk0 (ORCPT ); Mon, 15 Jan 2018 03:40:26 -0500 To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML From: SF Markus Elfring Subject: [PATCH] mfd/max8997: Delete an error message for a failed memory allocation in max8997_i2c_parse_dt_pdata() Message-ID: <9f9b92bd-96bc-bf7e-319c-b0f427468014@users.sourceforge.net> Date: Mon, 15 Jan 2018 09:40:23 +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:PuRsWVqreHWt+6gxAPZC9krf5BjCc6ecbyihDwnq0EyVn6eyrFL 1GL9a5vKzKrjdCvP/JlKDAbejt7bBFv9gOdMu3KAe5gml8J1BVVDqZRVUDLKeLZyhMCj+Ux iM0yYiWlgghFJRBiBjfkpGtXs2mDWHQQPcHd9Zkvt1/o7HBh0MZ8dSdBl5vs+Jg7XcO5Rmo WJZj7KuVCcGineNdaWCqw== X-UI-Out-Filterresults: notjunk:1;V01:K0:o1Y2pqabqh8=:mMJ+M5u4Scd6CZRfkxB7ar WgkpnowrN4k4IKxXTDQIfxaebvQYLyiQQK7rKy+38LTQXRnFZiZhnwOzA5peqjhxp2h7o7lFv NycF8B7o81VkKjNFwR5dFoGeVfL9EmfBRzDFesUcIs0bqPEgrV3Acqbp7ORil0W/FgJb4AO/8 zA72r1PrCTXxaGSHpWrlMsUpi6gu1azBSGCwD5qpD2PxL47zse7OKpCwOZ2i6fEItrd8xFIhp NtnxruFvjePifqX/+cn6sDvbRaJyS9gF+uF3mvkfsi1ifDWViWR69sOLvzlhdjgmS8nyDUtQG RThM4grZDrFVVd+wMIrvUBUJ8xmNgzblVAUBl28/8xBc51Q2iX7Y4YKJ3gbm5u90MMNFiAZbH qRe4K3lpERUfMEDzE8RvtQdD33jVolOuT39SXx9NlKpk7DzSYDx2Iz+1MwFsmA3ydEuHaPxNy YuTQ6N3fMpbn0QsoFM6lSBinsOy++8N//s1/71HfZHb6m8jRjps39aP0/Y1XZxEr4Ci5V9FDs JW6rT798GT9K9posYRrhEVbnO1Qf/ZW7equ6UnyEO/SNqX2VHV2raZ6ypOxRFqoRD3L5e7Pfl fdneI/kMtuo7eHcXbLArOB5J0r3TrWlJxOtTDAOzY8KHnGbhS05DnppGK/m/XTcb95bBlXItv BDtBKRpXzdBid3z1Vaq894u/zyeYvoeNduU9KSVZxVs62DUuo8yNPfm8ZSv/kGy7xh1Kf/Jv1 V2pcn7+MBJr9xxOgPwkZXcryK/VGE7aIKEfuXKAPjWcDyAkRa/4MtWO0MofGfWJ99q5eXtx4q gYnz5u+A4fdMcWIK2ow1ToqwuHrVS+rIRrhe4TTf3mNcjlN3IE= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Mon, 15 Jan 2018 09:35:17 +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/max8997.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c index 2d6e2c392786..3f554c447521 100644 --- a/drivers/mfd/max8997.c +++ b/drivers/mfd/max8997.c @@ -148,10 +148,8 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata( struct max8997_platform_data *pd; pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); - if (!pd) { - dev_err(dev, "could not allocate memory for pdata\n"); + if (!pd) return ERR_PTR(-ENOMEM); - } pd->ono = irq_of_parse_and_map(dev->of_node, 1); -- 2.15.1