From: Minghao Chi <[email protected]>
Return value directly instead of taking this in another redundant
variable.
Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Minghao Chi <[email protected]>
Signed-off-by: CGEL ZTE <[email protected]>
---
drivers/net/ethernet/intel/iavf/iavf_main.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 504fea4e90fb..a138dc64b8b7 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -1517,7 +1517,6 @@ static void iavf_fill_rss_lut(struct iavf_adapter *adapter)
static int iavf_init_rss(struct iavf_adapter *adapter)
{
struct iavf_hw *hw = &adapter->hw;
- int ret;
if (!RSS_PF(adapter)) {
/* Enable PCTYPES for RSS, TCP/UDP with IPv4/IPv6 */
@@ -1533,9 +1532,8 @@ static int iavf_init_rss(struct iavf_adapter *adapter)
iavf_fill_rss_lut(adapter);
netdev_rss_key_fill((void *)adapter->rss_key, adapter->rss_key_size);
- ret = iavf_config_rss(adapter);
- return ret;
+ return iavf_config_rss(adapter);
}
/**
@@ -4689,8 +4687,6 @@ static struct pci_driver iavf_driver = {
**/
static int __init iavf_init_module(void)
{
- int ret;
-
pr_info("iavf: %s\n", iavf_driver_string);
pr_info("%s\n", iavf_copyright);
@@ -4701,8 +4697,7 @@ static int __init iavf_init_module(void)
pr_err("%s: Failed to create workqueue\n", iavf_driver_name);
return -ENOMEM;
}
- ret = pci_register_driver(&iavf_driver);
- return ret;
+ return pci_register_driver(&iavf_driver);
}
module_init(iavf_init_module);
--
2.25.1
> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> [email protected]
> Sent: Monday, January 10, 2022 11:47 AM
> To: Brandeburg, Jesse <[email protected]>
> Cc: [email protected]; Zeal Robot <[email protected]>; linux-
> [email protected]; Minghao Chi <[email protected]>; intel-
> [email protected]; CGEL ZTE <[email protected]>;
> [email protected]; [email protected]
> Subject: [Intel-wired-lan] [PATCH] ethernet/intel: remove redundant ret
> variable
>
> From: Minghao Chi <[email protected]>
>
> Return value directly instead of taking this in another redundant variable.
>
> Reported-by: Zeal Robot <[email protected]>
> Signed-off-by: Minghao Chi <[email protected]>
> Signed-off-by: CGEL ZTE <[email protected]>
> ---
> drivers/net/ethernet/intel/iavf/iavf_main.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c
> b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index 504fea4e90fb..a138dc64b8b7 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
Tested-by: Konrad Jankowski <[email protected]>