]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
[PATCH] libata: fix ata_device_add() error path
authorTejun Heo <htejun@gmail.com>
Fri, 4 Aug 2006 18:59:19 +0000 (03:59 +0900)
committerTejun Heo <htejun@gmail.com>
Fri, 4 Aug 2006 18:59:19 +0000 (03:59 +0900)
commit77f3f879387cc5fce6c7a4ca7777c586fe6291cd
tree86cdb66936984d02bd1da3a84deec72fd805400d
parent6543bc0777fadf129d8ee7ac82e0090fb0480403
[PATCH] libata: fix ata_device_add() error path

In the error path, ata_device_add()

* dereferences null host_set->ports[] element.
* calls scsi_remove_host() on not-yet-added shost.

This patch fixes both bugs.  The first problem was spotted and initial
patch submitted by Dave Jones <davej@redhat.com>.  The second problem
was mentioned and fixed by Jeff Garzik <jgarzik@pobox.com> in a larger
cleanup patch.

Cc: Dave Jones <davej@redhat.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
drivers/scsi/libata-core.c