From patchwork Tue May 3 20:51:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 618145 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3qztd85d8gz9ssM for ; Wed, 4 May 2016 06:51:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 78095A75F1; Tue, 3 May 2016 22:51:36 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QejbI1GENzzl; Tue, 3 May 2016 22:51:36 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B0139A7558; Tue, 3 May 2016 22:51:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BA660A7564 for ; Tue, 3 May 2016 22:51:30 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a2EBcfY78XcW for ; Tue, 3 May 2016 22:51:30 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTPS id 71028A750E for ; Tue, 3 May 2016 22:51:27 +0200 (CEST) Received: from mail.nefkom.net (unknown [192.168.8.184]) by mail-out.m-online.net (Postfix) with ESMTP id 3qztct5Spjz3hjhF; Tue, 3 May 2016 22:51:26 +0200 (CEST) X-Auth-Info: 5ShBmuGhYm5Vou4DSbcah3ZsZJY5fzHoStD4bCFTY+k= Received: from chi.lan (unknown [195.140.253.167]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 3qztct1Bv8zvdWQ; Tue, 3 May 2016 22:51:26 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Date: Tue, 3 May 2016 22:51:14 +0200 Message-Id: <1462308680-9366-1-git-send-email-marex@denx.de> X-Mailer: git-send-email 2.7.0 Cc: Marek Vasut , Stephen Warren , Chin Liang See , Stefan Roese Subject: [U-Boot] [PATCH 1/7] usb: Don't init pointer to zero, but NULL X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The pointer should always be inited to NULL, not zero (0). These are two different things and not necessarily equal. Signed-off-by: Marek Vasut Cc: Chin Liang See Cc: Dinh Nguyen Cc: Hans de Goede Cc: Stefan Roese Cc: Stephen Warren Reviewed-by: Stefan Roese Reviewed-by: Chin Liang See Tested-by: Chin Liang See --- common/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/usb.c b/common/usb.c index 4d0de4d..63429d4 100644 --- a/common/usb.c +++ b/common/usb.c @@ -1064,7 +1064,7 @@ static int usb_prepare_device(struct usb_device *dev, int addr, bool do_read, int usb_select_config(struct usb_device *dev) { - unsigned char *tmpbuf = 0; + unsigned char *tmpbuf = NULL; int err; err = get_descriptor_len(dev, USB_DT_DEVICE_SIZE, USB_DT_DEVICE_SIZE);