Merge branch 'core/xen' into x86/xen
[safe/jmp/linux-2.6] / drivers / net / wireless / libertas / if_cs.c
index cc70d53..8941919 100644 (file)
@@ -122,7 +122,7 @@ static inline void if_cs_write16(struct if_cs_card *card, uint reg, u16 val)
 static inline void if_cs_write16_rep(
        struct if_cs_card *card,
        uint reg,
-       void *buf,
+       const void *buf,
        unsigned long count)
 {
        if (debug_output)
@@ -595,7 +595,7 @@ static int if_cs_prog_helper(struct if_cs_card *card)
                if (ret < 0) {
                        lbs_pr_err("can't download helper at 0x%x, ret %d\n",
                                sent, ret);
-                       goto done;
+                       goto err_release;
                }
 
                if (count == 0)
@@ -604,9 +604,8 @@ static int if_cs_prog_helper(struct if_cs_card *card)
                sent += count;
        }
 
+err_release:
        release_firmware(fw);
-       ret = 0;
-
 done:
        lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret);
        return ret;
@@ -676,14 +675,8 @@ static int if_cs_prog_real(struct if_cs_card *card)
        }
 
        ret = if_cs_poll_while_fw_download(card, IF_CS_SCRATCH, 0x5a);
-       if (ret < 0) {
+       if (ret < 0)
                lbs_pr_err("firmware download failed\n");
-               goto err_release;
-       }
-
-       ret = 0;
-       goto done;
-
 
 err_release:
        release_firmware(fw);