]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wireless/libertas/if_cs.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
[linux-2.6-omap-h63xx.git] / drivers / net / wireless / libertas / if_cs.c
index e2fe2d677324418f33c3ac6820be79f22665d6d7..842a08d1f1063427a1550062c436b62e2fde8701 100644 (file)
@@ -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);
@@ -720,7 +713,7 @@ static int if_cs_host_to_card(struct lbs_private *priv,
                ret = if_cs_send_cmd(priv, buf, nb);
                break;
        default:
-               lbs_pr_err("%s: unsupported type %d\n", __FUNCTION__, type);
+               lbs_pr_err("%s: unsupported type %d\n", __func__, type);
        }
 
        lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret);