Skip to content

Commit

Permalink
sata_via: restore vt*_prepare_host error handling
Browse files Browse the repository at this point in the history
commit b9d5b89 (sata_via: fix support
for 5287) accidently (?) removed vt*_prepare_host error handling - restore it

catched by gcc:
drivers/ata/sata_via.c: In function 'svia_init_one':
drivers/ata/sata_via.c:567: warning: 'host' may be used uninitialized in this function

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Marcin Slusarz authored and Jeff Garzik committed Nov 4, 2008
1 parent cadef67 commit 554d491
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/ata/sata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,10 @@ static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
rc = vt8251_prepare_host(pdev, &host);
break;
default:
return -EINVAL;
rc = -EINVAL;
}
if (rc)
return rc;

svia_configure(pdev);

Expand Down

0 comments on commit 554d491

Please sign in to comment.