Commit c3fec56e authored by Minghao Chi's avatar Minghao Chi Committed by Tony Nguyen

iavf: remove redundant ret variable

Return value directly instead of taking this in another redundant
variable.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: default avatarCGEL ZTE <cgel.zte@gmail.com>
Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent a3e839d5
...@@ -1523,7 +1523,6 @@ static void iavf_fill_rss_lut(struct iavf_adapter *adapter) ...@@ -1523,7 +1523,6 @@ static void iavf_fill_rss_lut(struct iavf_adapter *adapter)
static int iavf_init_rss(struct iavf_adapter *adapter) static int iavf_init_rss(struct iavf_adapter *adapter)
{ {
struct iavf_hw *hw = &adapter->hw; struct iavf_hw *hw = &adapter->hw;
int ret;
if (!RSS_PF(adapter)) { if (!RSS_PF(adapter)) {
/* Enable PCTYPES for RSS, TCP/UDP with IPv4/IPv6 */ /* Enable PCTYPES for RSS, TCP/UDP with IPv4/IPv6 */
...@@ -1539,9 +1538,8 @@ static int iavf_init_rss(struct iavf_adapter *adapter) ...@@ -1539,9 +1538,8 @@ static int iavf_init_rss(struct iavf_adapter *adapter)
iavf_fill_rss_lut(adapter); iavf_fill_rss_lut(adapter);
netdev_rss_key_fill((void *)adapter->rss_key, adapter->rss_key_size); netdev_rss_key_fill((void *)adapter->rss_key, adapter->rss_key_size);
ret = iavf_config_rss(adapter);
return ret; return iavf_config_rss(adapter);
} }
/** /**
...@@ -4745,8 +4743,6 @@ static struct pci_driver iavf_driver = { ...@@ -4745,8 +4743,6 @@ static struct pci_driver iavf_driver = {
**/ **/
static int __init iavf_init_module(void) static int __init iavf_init_module(void)
{ {
int ret;
pr_info("iavf: %s\n", iavf_driver_string); pr_info("iavf: %s\n", iavf_driver_string);
pr_info("%s\n", iavf_copyright); pr_info("%s\n", iavf_copyright);
...@@ -4757,8 +4753,7 @@ static int __init iavf_init_module(void) ...@@ -4757,8 +4753,7 @@ static int __init iavf_init_module(void)
pr_err("%s: Failed to create workqueue\n", iavf_driver_name); pr_err("%s: Failed to create workqueue\n", iavf_driver_name);
return -ENOMEM; return -ENOMEM;
} }
ret = pci_register_driver(&iavf_driver); return pci_register_driver(&iavf_driver);
return ret;
} }
module_init(iavf_init_module); module_init(iavf_init_module);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment