[PATCH 1/7] ata sff: set device pointer in ata port

Sascha Hauer s.hauer at pengutronix.de
Thu Dec 13 16:49:04 EST 2012


This was forgotten in the last ata updates and leads to NULL
pointer dereferences.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/ata/ide-sff.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ata/ide-sff.c b/drivers/ata/ide-sff.c
index 3dd6f63..632b0e5 100644
--- a/drivers/ata/ide-sff.c
+++ b/drivers/ata/ide-sff.c
@@ -333,6 +333,7 @@ int ide_port_register(struct device_d *dev, struct ata_ioports *io)
 
 	ide->io = io;
 	ide->port.ops = &ide_ops;
+	ide->port.dev = dev;
 
 	ret = ata_port_register(&ide->port);
 
-- 
1.7.10.4




More information about the barebox mailing list