* [PATCH] sata_via: restore vt*_prepare_host error handling
@ 2008-11-02 21:18 Marcin Slusarz
2008-11-03 2:47 ` Tejun Heo
2008-11-04 6:10 ` Jeff Garzik
0 siblings, 2 replies; 3+ messages in thread
From: Marcin Slusarz @ 2008-11-02 21:18 UTC (permalink / raw)
To: LKML; +Cc: Tejun Heo, Joseph Chan, Jeff Garzik, linux-ide
commit b9d5b89b487517cbd4cb4702da829e07ef9e4432 (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>
---
drivers/ata/sata_via.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 62367fe..c18935f 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -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);
--
1.5.6.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sata_via: restore vt*_prepare_host error handling
2008-11-02 21:18 [PATCH] sata_via: restore vt*_prepare_host error handling Marcin Slusarz
@ 2008-11-03 2:47 ` Tejun Heo
2008-11-04 6:10 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2008-11-03 2:47 UTC (permalink / raw)
To: Marcin Slusarz; +Cc: LKML, Joseph Chan, Jeff Garzik, linux-ide
Marcin Slusarz wrote:
> commit b9d5b89b487517cbd4cb4702da829e07ef9e4432 (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>
Acked-by: Tejun Heo <tj@kernel.org>
Thank you.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sata_via: restore vt*_prepare_host error handling
2008-11-02 21:18 [PATCH] sata_via: restore vt*_prepare_host error handling Marcin Slusarz
2008-11-03 2:47 ` Tejun Heo
@ 2008-11-04 6:10 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2008-11-04 6:10 UTC (permalink / raw)
To: Marcin Slusarz; +Cc: LKML, Tejun Heo, Joseph Chan, Jeff Garzik, linux-ide
Marcin Slusarz wrote:
> commit b9d5b89b487517cbd4cb4702da829e07ef9e4432 (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>
> ---
> drivers/ata/sata_via.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
> index 62367fe..c18935f 100644
> --- a/drivers/ata/sata_via.c
> +++ b/drivers/ata/sata_via.c
> @@ -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;
applied
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-04 6:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-02 21:18 [PATCH] sata_via: restore vt*_prepare_host error handling Marcin Slusarz
2008-11-03 2:47 ` Tejun Heo
2008-11-04 6:10 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).