From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 9.mo1.mail-out.ovh.net ([178.32.108.172] helo=mo1.mail-out.ovh.net) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UCaiU-0007e2-BH for barebox@lists.infradead.org; Mon, 04 Mar 2013 19:06:34 +0000 Received: from mail415.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo1.mail-out.ovh.net (Postfix) with SMTP id B6439FF9CA7 for ; Mon, 4 Mar 2013 20:22:43 +0100 (CET) Date: Mon, 4 Mar 2013 20:05:29 +0100 From: Jean-Christophe PLAGNIOL-VILLARD Message-ID: <20130304190529.GJ23022@game.jcrosoft.org> References: <1362412809-23253-1-git-send-email-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1362412809-23253-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH] usb: ehci: initialize ehci_data To: Sascha Hauer Cc: barebox@lists.infradead.org On 17:00 Mon 04 Mar , Sascha Hauer wrote: > Without it fields of ehci_data may be unitialized and the driver > crashes. > > Signed-off-by: Sascha Hauer > --- > drivers/usb/host/ehci-hcd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c > index 0c789e4..7c389aa 100644 > --- a/drivers/usb/host/ehci-hcd.c > +++ b/drivers/usb/host/ehci-hcd.c > @@ -892,7 +892,7 @@ int ehci_register(struct device_d *dev, struct ehci_data *data) > > static int ehci_probe(struct device_d *dev) > { > - struct ehci_data data; > + struct ehci_data data = {}; I'll prefer a memset > struct ehci_platform_data *pdata = dev->platform_data; > > /* default to EHCI_HAS_TT to not change behaviour of boards > -- > 1.7.10.4 > > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox