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 <[email protected]>
---
 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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to