Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iwlegacy: fix error return code in il3945_pci_probe()

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 <yongjun_wei@trendmicro.com.cn>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Wei Yongjun and committed by
John W. Linville
ca3ae513 c9e2404c

+2 -1
+2 -1
drivers/net/wireless/iwlegacy/3945-mac.c
··· 3727 3727 * 5. Setup HW Constants 3728 3728 * ********************/ 3729 3729 /* Device-specific setup */ 3730 - if (il3945_hw_set_hw_params(il)) { 3730 + err = il3945_hw_set_hw_params(il); 3731 + if (err) { 3731 3732 IL_ERR("failed to set hw settings\n"); 3732 3733 goto out_eeprom_free; 3733 3734 }