libata: handle ata_pci_device_do_resume() failure while resuming
PATCH 1/1 libata: handle ata_pci_device_do_resume() failure while resuming
Since commit:553c4aa630af7bc885e056d0436e4eb7f238579b ata_pci_device_do_resume() can return error code, all callers was updated except this one.
--- drivers/ata/sata_inic162x.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/ata/sata_inic162x.c +4 -1
@@ -639,7 +639,10 @@ static int inic_pci_device_resume(struct pci_dev *pdev)void __iomem *mmio_base = host->iomap[MMIO_BAR ];int rc; -ata_pci_device_do_resume (pdev); + rc =ata_pci_device_do_resume (pdev); +if (rc) { +return rc; + }if (pdev->dev.power.power_state.event ==PM_EVENT_SUSPEND ) {printk ("XXX\n" );
Signature · 1 line
1.4.4.4
Quoted 14 lines · On Sat, 24 Feb 2007 00:43:18 +0300 Dmitriy Monakhov wrote:
Since commit:553c4aa630af7bc885e056d0436e4eb7f238579b
ata_pci_device_do_resume()can return error code, all callers was updated except this one.Signed-off-by Monakhov Dmitriy <[email protected]>--- drivers/ata/sata_inic162x.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)drivers/ata/sata_inic162x.c +0
-0
drivers/ata/sata_inic162x.c static int inic_pci_device_resume(struct pci_dev *pdev) · line 644
Quoted 7 lines
drivers/ata/sata_inic162x.c +3
-1@@ -639,7 +639,10 @@ static int inic_pci_device_resume(struct pci_dev *pdev)void __iomem *mmio_base = host->iomap[MMIO_BAR ];int rc; -ata_pci_device_do_resume (pdev); + rc =ata_pci_device_do_resume (pdev); +if (rc) { +return rc;
Either (a) don't use the braces when they are not needed, or
(b) is it possible to add a meaningful message there, or is that done elsewhere?
drivers/ata/sata_inic162x.c static int inic_pci_device_resume(struct pci_dev *pdev) · line 648
Quoted 5 lines
drivers/ata/sata_inic162x.c +1
-0+ }if (pdev->dev.power.power_state.event ==PM_EVENT_SUSPEND ) {printk ("XXX\n" );
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
PATCH 1/1 libata: handle ata_pci_device_do_resume() failure while resuming (v2)
Quoted 19 lines · Randy Dunlap
Quoted 17 lines · On Sat, 24 Feb 2007 00:43:18 +0300 Dmitriy Monakhov wrote:
Since commit:553c4aa630af7bc885e056d0436e4eb7f238579b
ata_pci_device_do_resume()can return error code, all callers was updated except this one.Signed-off-by Monakhov Dmitriy <[email protected]>--- drivers/ata/sata_inic162x.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)drivers/ata/sata_inic162x.c +0
-0@@ -639,7 +639,10 @@ static int inic_pci_device_resume(struct pci_dev *pdev)void __iomem *mmio_base = host->iomap[MMIO_BAR ];int rc;
Quoted 8 lines
drivers/ata/sata_inic162x.c static int inic_pci_device_resume(struct pci_dev *pdev) · line 644
Quoted 4 lines
drivers/ata/sata_inic162x.c +3
-1-ata_pci_device_do_resume (pdev); + rc =ata_pci_device_do_resume (pdev); +if (rc) { +return rc;Either (a) don't use the braces when they are not needed, or
(b) is it possible to add a meaningful message there, or is that done elsewhere?
True. Thanks for correcting me here.
It is't realy necessary print err message because ata_pci_device_do_resume() already done this. So just remove braces.
Since commit:553c4aa630af7bc885e056d0436e4eb7f238579b ata_pci_device_do_resume() can return error code, all callers was updated except this one.
drivers/ata/sata_inic162x.c +3 -1
@@ -639,7 +639,9 @@ static int inic_pci_device_resume(struct pci_dev *pdev)void __iomem *mmio_base = host->iomap[MMIO_BAR ];int rc; -ata_pci_device_do_resume (pdev); + rc =ata_pci_device_do_resume (pdev); +if (rc) +return rc;if (pdev->dev.power.power_state.event ==PM_EVENT_SUSPEND ) {printk ("XXX\n" );