2013-06-05 02:16:35

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH] iwlegacy: fix error return code in il3945_pci_probe()

From: Wei Yongjun <[email protected]>

Fix to return a negative error code in the il3945_hw_set_hw_params() error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/net/wireless/iwlegacy/3945-mac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index dce5e8f..9581d07 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -3727,7 +3727,8 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
* 5. Setup HW Constants
* ********************/
/* Device-specific setup */
- if (il3945_hw_set_hw_params(il)) {
+ err = il3945_hw_set_hw_params(il);
+ if (err) {
IL_ERR("failed to set hw settings\n");
goto out_eeprom_free;
}



2013-06-05 08:11:44

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: [PATCH] iwlegacy: fix error return code in il3945_pci_probe()

On Wed, Jun 05, 2013 at 10:16:33AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> Fix to return a negative error code in the il3945_hw_set_hw_params() error
> handling case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <[email protected]>

Acked-by: Stanislaw Gruszka <[email protected]>