From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752035AbdLFNUB (ORCPT ); Wed, 6 Dec 2017 08:20:01 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:53980 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751443AbdLFNT7 (ORCPT ); Wed, 6 Dec 2017 08:19:59 -0500 Date: Wed, 6 Dec 2017 16:18:34 +0300 From: Dan Carpenter To: Julia Lawall Cc: SF Markus Elfring , linux-usb@vger.kernel.org, Felipe Balbi , Greg Kroah-Hartman , Johan Hovold , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] USB: emi26: Delete an error message for a failed memory allocation in emi26_writememory() Message-ID: <20171206131834.qxlswkis72wmzed7@mwanda> References: <244f8baf-0cd7-89f5-b210-7c321e180f11@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8736 signatures=668641 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712060195 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 06, 2017 at 01:12:32PM +0100, Julia Lawall wrote: > > > On Wed, 6 Dec 2017, SF Markus Elfring wrote: > > > From: Markus Elfring > > Date: Wed, 6 Dec 2017 13:03:21 +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/usb/misc/emi26.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c > > index 24d841850e05..654e93857d65 100644 > > --- a/drivers/usb/misc/emi26.c > > +++ b/drivers/usb/misc/emi26.c > > @@ -42,10 +42,9 @@ static int emi26_writememory (struct usb_device *dev, int address, > > int result; > > unsigned char *buffer = kmemdup(data, length, GFP_KERNEL); > > > > - if (!buffer) { > > - dev_err(&dev->dev, "kmalloc(%d) failed.\n", length); > > I guess the length information would not be so easy to find in the > backtrace. > I think it prints the "order" but not the exact size. regards, dan carpeneter