]> err.no Git - linux-2.6/commitdiff
prism54: remove questionable down_interruptible usage
authorDaniel Walker <dwalker@mvista.com>
Sat, 22 Dec 2007 04:16:15 +0000 (20:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:09:12 +0000 (15:09 -0800)
Reviewing the semaphore usage I noticed these down_interruptible calls.  Most
of these aren't returning anything, so a caller can't tell if the operation
completed or not.  prism54_wpa_bss_ie_get() returns zero, but it's treated as
the function failing which doesn't seem correct.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/prism54/isl_ioctl.c

index b9d00730a68d49f3ff795f7904cf40efb896aeca..1b595a6525f4e4346ba2b1f9100ba31e8c1ddfef 100644 (file)
@@ -165,8 +165,7 @@ prism54_update_stats(struct work_struct *work)
        struct obj_bss bss, *bss2;
        union oid_res_t r;
 
-       if (down_interruptible(&priv->stats_sem))
-               return;
+       down(&priv->stats_sem);
 
 /* Noise floor.
  * I'm not sure if the unit is dBm.
@@ -1793,8 +1792,7 @@ prism54_clear_mac(struct islpci_acl *acl)
        struct list_head *ptr, *next;
        struct mac_entry *entry;
 
-       if (down_interruptible(&acl->sem))
-               return;
+       down(&acl->sem);
 
        if (acl->size == 0) {
                up(&acl->sem);
@@ -2116,8 +2114,7 @@ prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid,
        if (wpa_ie_len > MAX_WPA_IE_LEN)
                wpa_ie_len = MAX_WPA_IE_LEN;
 
-       if (down_interruptible(&priv->wpa_sem))
-               return;
+       down(&priv->wpa_sem);
 
        /* try to use existing entry */
        list_for_each(ptr, &priv->bss_wpa_list) {
@@ -2178,8 +2175,7 @@ prism54_wpa_bss_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie)
        struct islpci_bss_wpa_ie *bss = NULL;
        size_t len = 0;
 
-       if (down_interruptible(&priv->wpa_sem))
-               return 0;
+       down(&priv->wpa_sem);
 
        list_for_each(ptr, &priv->bss_wpa_list) {
                bss = list_entry(ptr, struct islpci_bss_wpa_ie, list);