9
0
Fork 0

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>
This commit is contained in:
Andrey Smirnov 2017-03-08 14:09:05 -08:00 committed by Sascha Hauer
parent ef54fb4b1f
commit 05c34d220c
1 changed files with 1 additions and 1 deletions

View File

@ -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))