From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cl1X2-0001LM-NS for barebox@lists.infradead.org; Mon, 06 Mar 2017 22:55:09 +0000 Received: by mail-pg0-x242.google.com with SMTP id b5so4150276pgg.1 for ; Mon, 06 Mar 2017 14:54:48 -0800 (PST) From: Andrey Smirnov Date: Mon, 6 Mar 2017 14:53:50 -0800 Message-Id: <20170306225356.31475-40-andrew.smirnov@gmail.com> In-Reply-To: <20170306225356.31475-1-andrew.smirnov@gmail.com> References: <20170306225356.31475-1-andrew.smirnov@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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: [PATCH 39/45] usb: ehci-atmel: Zero ehci_data before using it To: barebox@lists.infradead.org Cc: Andrey Smirnov Zero ehci_data before using it as an argument for echi_register, otherwise bogus values (some of which are interpreted as callbacks) will be passed through, resulting in illegal memory accesses. Signed-off-by: Andrey Smirnov --- drivers/usb/host/ehci-atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index 7a9d942..4b9fc0a 100644 --- a/drivers/usb/host/ehci-atmel.c +++ b/drivers/usb/host/ehci-atmel.c @@ -89,7 +89,7 @@ static int atmel_ehci_probe(struct device_d *dev) if (ret < 0) return ret; - data.flags = 0; + memset(&data, 0, sizeof(data)); iores = dev_request_mem_resource(dev, 0); if (IS_ERR(iores)) -- 2.9.3 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox