From patchwork Tue Oct 15 14:19:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 11190451 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D35D13BD for ; Tue, 15 Oct 2019 14:20:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 86A50218DE for ; Tue, 15 Oct 2019 14:20:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732571AbfJOOT4 (ORCPT ); Tue, 15 Oct 2019 10:19:56 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:49897 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730697AbfJOOT4 (ORCPT ); Tue, 15 Oct 2019 10:19:56 -0400 Received: from [167.98.27.226] (helo=rainbowdash.codethink.co.uk) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1iKNfv-0004bb-Dk; Tue, 15 Oct 2019 15:19:47 +0100 Received: from ben by rainbowdash.codethink.co.uk with local (Exim 4.92.2) (envelope-from ) id 1iKNfv-0004Bu-36; Tue, 15 Oct 2019 15:19:47 +0100 From: Ben Dooks To: linux-kernel@lists.codethink.co.uk Cc: Ben Dooks , Vladimir Zapolskiy , Sylvain Lemieux , Alan Stern , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: ohci-nxp: fix use of integer as pointer Date: Tue, 15 Oct 2019 15:19:45 +0100 Message-Id: <20191015141945.16067-1-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The hcd pointer in ohci_hcd_nxp_probe() is being initialised with a 0, so fix to NULL to avoid the following sparse warning: drivers/usb/host/ohci-nxp.c:153:31: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks Acked-by: Sylvain Lemieux --- Cc: Vladimir Zapolskiy Cc: Sylvain Lemieux Cc: Alan Stern Cc: Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org Cc: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/usb/host/ohci-nxp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c index c561881d0e79..85878e8ad331 100644 --- a/drivers/usb/host/ohci-nxp.c +++ b/drivers/usb/host/ohci-nxp.c @@ -150,7 +150,7 @@ static void ohci_nxp_stop_hc(void) static int ohci_hcd_nxp_probe(struct platform_device *pdev) { - struct usb_hcd *hcd = 0; + struct usb_hcd *hcd = NULL; const struct hc_driver *driver = &ohci_nxp_hc_driver; struct resource *res; int ret = 0, irq;