From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cljmR-0006iq-T3 for barebox@lists.infradead.org; Wed, 08 Mar 2017 22:10:11 +0000 Received: by mail-pf0-x243.google.com with SMTP id v190so5076941pfb.0 for ; Wed, 08 Mar 2017 14:09:40 -0800 (PST) From: Andrey Smirnov Date: Wed, 8 Mar 2017 14:09:05 -0800 Message-Id: <20170308220909.4560-17-andrew.smirnov@gmail.com> In-Reply-To: <20170308220909.4560-1-andrew.smirnov@gmail.com> References: <20170308220909.4560-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 16/20] 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