Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751515AbeAPQmi (ORCPT + 1 other); Tue, 16 Jan 2018 11:42:38 -0500 Received: from mout.web.de ([217.72.192.78]:52140 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbeAPQme (ORCPT ); Tue, 16 Jan 2018 11:42:34 -0500 To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML , =?UTF-8?Q?Lars_P=c3=b6schel?= , Samuel Ortiz From: SF Markus Elfring Subject: [PATCH] mfd/viperboard: Delete an error message for a failed memory allocation in vprbrd_probe() Message-ID: <9c50fe6a-21cc-e49d-1b10-5d2457ed4e2a@users.sourceforge.net> Date: Tue, 16 Jan 2018 17:42:26 +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:w5YKU0X2EMEM52uk2HfIabdfRtc71o7QWfxWWcVATmj4oOaj2rK JIg4ZHraB2JxiGEoXKyGxfNwDChPTi5KgLytBjrWGSjDWezxIWS5J8QLKI/6/VwxS2OfxZ/ 4ywSkjERWizq14G2dnSZjVgI7rFtg4pL6sptQ8pFLvI2otKH2p6zHUMGogSCNEBgSHcc+96 8GozKyKlCWq+1NKbDR8yw== X-UI-Out-Filterresults: notjunk:1;V01:K0:+WxVtyL9/Xk=:vCzAOx779cNTWeC+zb1tzg 30TqWE8465yqG8+n9KTILKqmxwqFACWY8qdYou3onjntEosB/5AoB3RFz9pEVvmifzLoeNUpf BU7ytU317+DO6N6BuwEJLTeXfN10F0reJrg7T45oinEKV8l2B2gIQJtO+tUGw2awVddN+odMG iqSRnVoagT689CsQBxlZOG6XghKFSNz3dnGAW+tZBWtqlWyJ4wlhTmTHyIyuk/qTxi6YSnZn1 +2aKWUOyi5zofm4y6V8RVQ47s1qeMk5jcFlliJIeUBNNfEJpQT5k1AMLbaxCQPtkyZ2Kk0S87 5fM/eeHOT442QVuVcBKWrPKc4n4JBaOoxFPQoYKBdJRZ7C9+Qki6B0nAb0y88WUKqcCxceS7Y MkPF5YnJTDFvHoV9cioV2hP3awhKILbwMKOIGhgSAWCRHolX+4CQBE7/bu7LT2TLODNQ7g5wx A9ct1DsjkBVyO+NgdZyskIIyhkF8MpZq75iIgwB3u3st4OExXXbMVTQVhVqiUoBgIjfkfbHvc pQsnNPZUoyX6l3pOsn6PofSJj/jcooLZAFgNHj+wJ+K6Iy49xtqPkOJGRtY+DuCiKQR9FlolG pr96DHiyWp3oMRIR3QmRLxGU6WIS5tu+d4BcWCT4kASyx0lFpZDG1o6JMZ45nQZu7JYwXY6bo xNInwUxsbR2StS3KKgU1sWR+52nDAYMUOYV2DQhUIFKFpODk+ughj+MDMYWeyZ/7C73hN+LSo HyYc4zZGkopXRBkq7sBRDnvgnqkXjhAgSbXf6ESufzcjHb6AXTxVgm1GU9pCpl+h2v3Mk2s+H uCci0ugnqo1omXKJQifhAZDQtzPmBs/72aHZZnyYIwHWPwdJqY= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Tue, 16 Jan 2018 17:30:23 +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/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.15.1