Received: by 10.223.176.5 with SMTP id f5csp2945941wra; Thu, 1 Feb 2018 08:25:52 -0800 (PST) X-Google-Smtp-Source: AH8x224zsI9pUOxiIF9NMc9q2WBbx3hXRNxosUwZD6DbRwQZC6VVkH+ZKTqs5iOnhjxV6SxwbH85 X-Received: by 2002:a17:902:a984:: with SMTP id bh4-v6mr12161953plb.95.1517502351920; Thu, 01 Feb 2018 08:25:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517502351; cv=none; d=google.com; s=arc-20160816; b=tkYmqKCBE0bCYVBPUaQfpqfIPuiL/x20BTukgwxCiVzemIIcImGUyCubafPKIgy+6e XeVkQTypAAWqWpEBBe5GqOqlil/WvaGubmcp4gZIcAyWV0DKPYAZ5nvhhl5H96k9cyk5 uIVC7NOGNayHdP2WF/dlssplgo+XwK+Kw7Wc1XjQOwHcMIBffy8XxWVotnd1UBOEzkby Oi52KCXN2vsgv3/i1yjko6XYukTuVSKnKqd4tpRnnl0sR4WGyX8HcaEMFDOaRjsNSP+Y CcPzgJOl0HGxOVY8n2A5HPYBDWHQaKueR+nO6KMXnQ/7Xq5f6VCGR3j3W5FPvB2nsOql U+1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:arc-authentication-results; bh=GrSyWKfZtEJp83o7YwGNoywTPwECOArFAkX2RxVmq44=; b=LCU8acih6yb9GACuuS68R43ASfPZroc0TlcQ9LOqo0ysN2H+azc+5q1RQQhKMjLXeI +2qlDSJmo8TownBvsCz0Li9fbrgfFk5XlibtURwJzKewP3cOfyRVJtJGItq4+xJrXe2u 4/Y89EvaNQWJmuH5wZETkEF5FXhyoA3RLnr7qDuw1kyABbX7N4AXxtA6upyuhkbBD9Hi ROxFOBTXX7ay4cq0vtkEcxt/TRc9Ng6hYii+TKSXbr8A4740lrHjakqJ+BHVCCgJ2zLp Y8TVe1DgSqaQy75X03WAUbk4L+8TE9Csu+Unzf8EQGG/ZahgRjj0jJpce5Vt8116kfqB AxDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s22-v6si207791plk.550.2018.02.01.08.25.37; Thu, 01 Feb 2018 08:25:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752664AbeBAQYe (ORCPT + 99 others); Thu, 1 Feb 2018 11:24:34 -0500 Received: from mout.web.de ([212.227.15.4]:58943 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567AbeBAQY1 (ORCPT ); Thu, 1 Feb 2018 11:24:27 -0500 Received: from [192.168.1.2] ([77.182.97.34]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MK2JZ-1ei6TD1WAX-001PyD; Thu, 01 Feb 2018 17:24:14 +0100 To: linux-i2c@vger.kernel.org, Peter Rosin , Wolfram Sang , York Sun Cc: LKML , kernel-janitors@vger.kernel.org, Alexander Sverdlin From: SF Markus Elfring Subject: [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe_dt() Message-ID: <224a8918-f882-9ab1-218c-83df93d4cb2f@users.sourceforge.net> Date: Thu, 1 Feb 2018 17:24:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:J9lesRdQ824wBFz8+ancgBSaB/mx636s+mliJpC5y9ALFaAwXks a6mctGOWbDxV8CTjQH1I4p0RBIOtWk3EcY6bNTukjbKY6zyC4K/jwpkB9HlP+rKmg1YRxKq NFQdHSdcRMLCXzVDQkMj5SfZZ3+CsLwLXpNSlS+05mKRVj5U+MPt8UegT1MJ2vqzxrb6HwB CLtIGIVmGz8VH1CpTpntg== X-UI-Out-Filterresults: notjunk:1;V01:K0:3HWSpoYenGA=:vy7OszB/CWGGEGWUjqVzAK 2t6dmiodHvTwc2cJCUrtmvvkxAlhz2hWoL5PpCw994SUh2xJ0DdgZGCKGbqvOY3OU8O4s+WN2 lyVMw1XyXSlCeOWlGvym3jrMfOTZ0WeBwsRGCBWyiHZ9X/4JzjoJUVedZpfwte149KN+u8gCv KH5RumKENQnW3Q9Vw1DwvVZyfXF4oyTIPZsrSn1BBHMKFB3ksMUxFIBrYx/gvoFmaO0GjoqAG XXc7EIN968ibvsd5GHk/trcIyuSekrRjBWtT99iHHA84Dh8sFkbip+NFgfjh1lC6ZHUdOIS52 xzSy8RUB4APCscEX6MRKZ24srwLO4T3uqR4zDK0p9dQ6ue6oD1QWk1lVWzpbyXk/TF+KlH1bt 9af33SVwbTYySlQNbuY7cR2SsSIp5963ojCbwYV2umXO6NfJCWYzSxu4ZRmesISO8695oyihv sZsEj8LwVFFRoIC0Wk6fTEdaQVjKaMtSASiHcdtcPjvqAoLQ06qNZXBbLCIR/A/T1BYTqtxA7 hERBe/bjI+acck2L97Mm3jmGwGlFCv8VeHKlH8m4U6ZV+Rd8jhv7noBQYZ028RG174hjXmr9g FEwD+TxeKmA3qTD4oMxBhEr/G0k3rmis/MPT4+kNgyXtIe06ZhgsYiRYJXBxNFrrDupY/he4G IcCXPAwlucxcP/jyygpJ+RZY3HqwpwLtzqtEZKQVeTOrhdsEbqelvKDy8IAChvG+zoPNIl+5M sGZwnZA3+yE8+BQ7be4czaqGuO1t9FJgOD7CGqGurpJbb0N6j5VkB49aM0EZpF6JruMdmEbrH CGDg2q0yTcYPXVCuhb9uXbzv7p9I23gx+gNw31FIRxKKtfAKnM= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Thu, 1 Feb 2018 17:17:19 +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/i2c/muxes/i2c-mux-reg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c index c948e5a4cb04..f624ed64a47b 100644 --- a/drivers/i2c/muxes/i2c-mux-reg.c +++ b/drivers/i2c/muxes/i2c-mux-reg.c @@ -127,10 +127,8 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux, values = devm_kzalloc(&pdev->dev, sizeof(*mux->data.values) * mux->data.n_values, GFP_KERNEL); - if (!values) { - dev_err(&pdev->dev, "Cannot allocate values array"); + if (!values) return -ENOMEM; - } for_each_child_of_node(np, child) { of_property_read_u32(child, "reg", values + i); -- 2.16.1