提交 c38778c3 编写于 作者: D Dave Jones 提交者: Jeff Garzik

[PATCH] Fix reference of uninitialised memory in ata_device_add()

ata_device_add fails, calls ata_host_remove with pointers to unitialized
memory.
Signed-off-by: NDave Jones <davej@redhat.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 bda30288
......@@ -5478,11 +5478,10 @@ int ata_device_add(const struct ata_probe_ent *ent)
int irq_line = ent->irq;
ap = ata_port_add(ent, host, i);
host->ports[i] = ap;
if (!ap)
goto err_out;
host->ports[i] = ap;
/* dummy? */
if (ent->dummy_port_mask & (1 << i)) {
ata_port_printk(ap, KERN_INFO, "DUMMY\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册