Received: by 10.223.185.111 with SMTP id b44csp525402wrg; Fri, 9 Mar 2018 08:52:17 -0800 (PST) X-Google-Smtp-Source: AG47ELtXyXwLrMu6J7uAgFSNqX/DKWuskYYYudAnDwY+K+f4dwSFIRbAAJfPlWo8uPpfNGHFnZZK X-Received: by 10.98.8.219 with SMTP id 88mr30786738pfi.4.1520614337192; Fri, 09 Mar 2018 08:52:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520614337; cv=none; d=google.com; s=arc-20160816; b=rwf8ype9b9/VfCsjNxYf2gDhbJsLxRKsh8CFn3nDGwvlK5YKP3aP5/SVG7oy4kjvgX e/iUUKGGprt3s/myu4kM+XOHk4fXU6bXRJYOJy+39EZN0k20uBu1TqQKRWwlb4Jd9ALn K97AtXIyUj5Cso3DU6nnrxVHrbFEXgxWSuSZAUF6PgT7bboDCYbn4fIiC01OyT9hLSNd 7YVyr4LTNzeLmtUXKsi8RR+0E+C1E2InEmbjBJllxiUt/mVOS9m+3hStZe6O03lmShVw jCLAY+asbcyVdXVfq1khly7Xx7CkSbJ5IR8ICCPMJEhVAmJEQf1byDskAHZp5JtlUSP1 dHyw== 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:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=qHnWmyZNZ0Zx+6DqnQthgkho/0Xy3js3pAKjdYmiJAQ=; b=YlnJ03QVqEyClJ2yDeswmcItiO5VJW1AIK8R7FsHwJ1Hs5kC6h8jIxD/loEvaZNm+W /qoC0mpSbEouZYB02SJeFfdKwTDrhQaQarQVCH6M6vaYFcNTtjhXTi3dDRl0JE/DiaX6 IcFynZvPcv/+tSt81v16gX5KarME8TDrs/11xFSVi+ChMv8kgLcMJfKk/3o/Zte8nd3H SkgDcBHOp77oBqSKsaORikfl3RusZQL7ps/xx9nLp+Xvmu9nh3K8xZnKJdX1Y+AYsiTe qZT85E3ammgrtF5u5ze58fnbA02oGJw90iE3GsRAvsZUzbNljf3yjGvCT7F5W4zPZibI iDEA== 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 t28si1123154pfk.187.2018.03.09.08.52.02; Fri, 09 Mar 2018 08:52:17 -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 S932085AbeCIQu5 (ORCPT + 99 others); Fri, 9 Mar 2018 11:50:57 -0500 Received: from mout.web.de ([212.227.17.12]:43103 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159AbeCIQu4 (ORCPT ); Fri, 9 Mar 2018 11:50:56 -0500 Received: from [192.168.1.2] ([92.228.30.253]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MKa2F-1evARY2RJH-001xbJ; Fri, 09 Mar 2018 17:50:51 +0100 Subject: [PATCH v2 17/17] mfd: viperboard: Delete an error message for a failed memory allocation in vprbrd_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML , =?UTF-8?Q?Lars_P=c3=b6schel?= , Samuel Ortiz References: Message-ID: <1ebf63da-0b54-73a2-2256-9b932ed2ab0a@users.sourceforge.net> Date: Fri, 9 Mar 2018 17:50:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:WmwDksRkFXFDV9rOYLCiPmW0svb+hvA1JkfXghC/EwnNtlcfh2Q cn/c/fvunvA6btj4JXn66qMAaKx/C2K/KiHe5ciwK8gaSh5coJ26OEQG3lR4pxPvB/hSekk CjVhgeWu/Yw3h8miK+upCNdr/932MXm7h7I/P5Ul+KmmgPBoJ/8ncc/zWY7RvvurkOHwyJs A+AQVSQ4q2BQHdCgJO1GA== X-UI-Out-Filterresults: notjunk:1;V01:K0:mEmlF01SQrE=:B6fQ+b9TgNyk8dMXE1N4t7 mo9EbEp2BsL2eje+mIXy2fXkxUImmfHBWppj05ngt0pD7v0IJdJQgWn1w+690n0ddpiDTzm1N zSHOv5bV/RRn5ZGJcpTBUwPd6ieKriZURVb9NfovVebrEcEGD0+ZcbWV/gYl6Mv8P4T6oUnc5 K/gM4jKp7ui5A7+mYL+o+yPQnXc+vPgiQmbUr7YF5ex+iYWR7ftZ9/bfHt5FQ75eC8qzkQUAn d7RuHbrDcdK94T3HJDwVLqxME3DL/WU4Vl4sB6vR0uwaPmjMpo37MURZl9aCGdcV7bEPtXdMp 7nUtthi0UewPi66XRZmJ3PQSqMRbteIVr22ELt8UAdU0fEqeFSGTZHOEy4Mw3xOfOSgsbvLGj gYl0yfX+Fp/+LmLDYCHI+3PBhX9j84zAvf7g1Wh3OVRCeyzzNtxQFBRA3p3DuNjd1ef80J9v7 y7hhX61JGITqyHS5UXXa5fT0k2pDAiebOvnXy17kTQvHqnrVUNHgqv/w9+lXXbOib2lR/OVxf CtT1V+i7O4efnSmo+mKamTtWDNS6Ls3trt3q6msHHRRilk6Z1v7SCZ3A3dTk1a+eMvByF5wSd oF1RZOiiemWK9azkh/lWPL7//Wm6DlGmcgtQznvlWSWj0cP5u1vAWgUeRvhd9d8N0E1u52nLm nkG13xo4Oga+toReOQbSK+ATKCPgMkwUTDRqeW5xdIGPPd+bau+ProsjjFEMy4y9zx6+fQ8OW ly3qbZBv5DKb8FL7bxFdfZTzA6vNa0/r/afR/6t3+KyylHg4696kEIW6FUv6YikHPPm3mncHB v1jjJLZmOOD7E5YGzVYjsUapLe5uKkDg64+vFMejQ8Mqpg/Fy0= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Fri, 9 Mar 2018 09:56:31 +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 --- v2: Lee Jones requested a resend for this patch. The change was rebased on source files from Linux next-20180308. drivers/mfd/viperboard.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/viperboard.c b/drivers/mfd/viperboard.c index e6b3c70aeb22..e9f61262d583 100644 --- a/drivers/mfd/viperboard.c +++ b/drivers/mfd/viperboard.c @@ -59,10 +59,8 @@ static int vprbrd_probe(struct usb_interface *interface, /* allocate memory for our device state and initialize it */ vb = kzalloc(sizeof(*vb), GFP_KERNEL); - if (vb == NULL) { - dev_err(&interface->dev, "Out of memory\n"); + if (!vb) return -ENOMEM; - } mutex_init(&vb->lock); -- 2.16.2