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

[PATCH] hostap: Fix hw reset after CMDCODE_ACCESS_WRITE timeout

The Coverity checker (CID: 59) noted that the call to prism2_hw_reset()
was dead code. Move prism2_hw_reset() call to a place where it is
actually executed.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Adrian Bunk and committed by
John W. Linville
971d1e69 9e75af30

+4 -4
+4 -4
drivers/net/wireless/hostap/hostap_hw.c
··· 928 928 929 929 res = hfa384x_cmd(dev, HFA384X_CMDCODE_ACCESS_WRITE, rid, NULL, NULL); 930 930 up(&local->rid_bap_sem); 931 + 931 932 if (res) { 932 933 printk(KERN_DEBUG "%s: hfa384x_set_rid: CMDCODE_ACCESS_WRITE " 933 934 "failed (res=%d, rid=%04x, len=%d)\n", 934 935 dev->name, res, rid, len); 935 - return res; 936 - } 937 936 938 - if (res == -ETIMEDOUT) 939 - prism2_hw_reset(dev); 937 + if (res == -ETIMEDOUT) 938 + prism2_hw_reset(dev); 939 + } 940 940 941 941 return res; 942 942 }