]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
iwlwifi: code cleanup to remove un-necessary "goto"
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Tue, 15 Jun 2010 00:09:56 +0000 (17:09 -0700)
committerReinette Chatre <reinette.chatre@intel.com>
Mon, 21 Jun 2010 17:47:39 +0000 (10:47 -0700)
Break out of loop and log the error message when encounter error; this is
better approach than using "goto".

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn-calib.c

index d03b5e57759f9e068bcb7247dd3c06faafe3c8e5..400eb312b5554064826ab681e5caaad4a102c4b9 100644 (file)
@@ -96,14 +96,14 @@ int iwl_send_calib_results(struct iwl_priv *priv)
                        hcmd.len = priv->calib_results[i].buf_len;
                        hcmd.data = priv->calib_results[i].buf;
                        ret = iwl_send_cmd_sync(priv, &hcmd);
-                       if (ret)
-                               goto err;
+                       if (ret) {
+                               IWL_ERR(priv, "Error %d iteration %d\n",
+                                       ret, i);
+                               break;
+                       }
                }
        }
 
-       return 0;
-err:
-       IWL_ERR(priv, "Error %d iteration %d\n", ret, i);
        return ret;
 }