From patchwork Thu Aug 25 17:39:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 9299629 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AA19D60757 for ; Thu, 25 Aug 2016 17:42:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F5952939E for ; Thu, 25 Aug 2016 17:42:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93A65293A9; Thu, 25 Aug 2016 17:42:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2C4142939E for ; Thu, 25 Aug 2016 17:42:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bcye0-0008Ce-LK; Thu, 25 Aug 2016 17:40:48 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bcydh-0007Fc-Fr for linux-arm-kernel@lists.infradead.org; Thu, 25 Aug 2016 17:40:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references; s=k1; bh=SME9PI+GyidNZyVYqcRsoD8FE0TyG0tUbLtsPGzRIUs=; b=Vlf9CajojGK3 BZMI2ILTha0XQBrMh3eKYDvkAQCvN9IcQYwSooHteUT4fnPSNXf7gwRW+uG1ZA+G rZH5Uj7gvW+edSoOyt4x0sRZPV0eB8m1Fes4xIFJIVikH02zviX+kRPZrvEmnKlt mIxvJlbhSLgPI61BSRp1MDYjKGxnO34= Received: (qmail 7014 invoked from network); 25 Aug 2016 19:40:09 +0200 Received: from dslb-178-008-076-018.178.008.pools.vodafone-ip.de (HELO localhost) (l3s3148p1@178.8.76.18) by mail.zeus03.de with ESMTPSA (ECDHE-RSA-AES256-GCM-SHA384 encrypted, authenticated); 25 Aug 2016 19:40:09 +0200 From: Wolfram Sang To: linux-usb@vger.kernel.org Subject: [PATCH 13/44] usb: gadget: udc: udc-xilinx: don't print on ENOMEM Date: Thu, 25 Aug 2016 19:39:05 +0200 Message-Id: <20160825173947.26624-14-wsa-dev@sang-engineering.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160825173947.26624-1-wsa-dev@sang-engineering.com> References: <20160825173947.26624-1-wsa-dev@sang-engineering.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160825_104029_915393_5E3432C0 X-CRM114-Status: UNSURE ( 6.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , Greg Kroah-Hartman , Michal Simek , Wolfram Sang , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang --- drivers/usb/gadget/udc/udc-xilinx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c index f8bf290f189444..588e2531b8b81e 100644 --- a/drivers/usb/gadget/udc/udc-xilinx.c +++ b/drivers/usb/gadget/udc/udc-xilinx.c @@ -973,10 +973,8 @@ static struct usb_request *xudc_ep_alloc_request(struct usb_ep *_ep, udc = ep->udc; req = kzalloc(sizeof(*req), gfp_flags); - if (!req) { - dev_err(udc->dev, "%s:not enough memory", __func__); + if (!req) return NULL; - } req->ep = ep; INIT_LIST_HEAD(&req->queue);