diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2017-03-08 14:09:05 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-09 11:51:28 +0100 |
commit | 05c34d220c8e3f3a30d5877ab56681fbae85622e (patch) | |
tree | 4999e695c7feed66c1735ff4b5b1fa9819242414 /drivers/usb/host | |
parent | ef54fb4b1f14ed89f06b9e5158770ac6df9b64f8 (diff) | |
download | barebox-05c34d220c8e3f3a30d5877ab56681fbae85622e.tar.gz barebox-05c34d220c8e3f3a30d5877ab56681fbae85622e.tar.xz |
usb: ehci-atmel: Zero ehci_data before using it
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 <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-atmel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index 7a9d942a1a..4b9fc0a948 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)) |