netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] igc: fix error return handling from call to netif_set_real_num_tx_queues
@ 2018-10-19 18:16 Colin King
  2018-10-24 10:38 ` Neftin, Sasha
  2018-11-01 19:26 ` [Intel-wired-lan] " Brown, Aaron F
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-10-19 18:16 UTC (permalink / raw)
  To: Sasha Neftin, Jeff Kirsher, David S . Miller, intel-wired-lan
  Cc: kernel-janitors, netdev

From: Colin Ian King <colin.king@canonical.com>

The call to netif_set_real_num_tx_queues is not assigning the error
return to variable err even though the next line checks err for an
error.  Fix this by adding the missing err assignment.

Detected by CoverityScan, CID#1474551 ("Logically dead code")

Fixes: 3df25e4c1e66 ("igc: Add interrupt support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 9d85707e8a81..80ddbd987764 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3358,7 +3358,7 @@ static int __igc_open(struct net_device *netdev, bool resuming)
 		goto err_req_irq;
 
 	/* Notify the stack of the actual queue counts. */
-	netif_set_real_num_tx_queues(netdev, adapter->num_tx_queues);
+	err = netif_set_real_num_tx_queues(netdev, adapter->num_tx_queues);
 	if (err)
 		goto err_set_queues;
 
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] igc: fix error return handling from call to netif_set_real_num_tx_queues
  2018-10-19 18:16 [PATCH][next] igc: fix error return handling from call to netif_set_real_num_tx_queues Colin King
@ 2018-10-24 10:38 ` Neftin, Sasha
  2018-11-01 19:26 ` [Intel-wired-lan] " Brown, Aaron F
  1 sibling, 0 replies; 3+ messages in thread
From: Neftin, Sasha @ 2018-10-24 10:38 UTC (permalink / raw)
  To: Colin King, Jeff Kirsher, David S . Miller, intel-wired-lan
  Cc: kernel-janitors, netdev, Neftin, Sasha

On 10/19/2018 21:16, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The call to netif_set_real_num_tx_queues is not assigning the error
> return to variable err even though the next line checks err for an
> error.  Fix this by adding the missing err assignment.
> 
> Detected by CoverityScan, CID#1474551 ("Logically dead code")
> 
> Fixes: 3df25e4c1e66 ("igc: Add interrupt support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   drivers/net/ethernet/intel/igc/igc_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
> index 9d85707e8a81..80ddbd987764 100644
> --- a/drivers/net/ethernet/intel/igc/igc_main.c
> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> @@ -3358,7 +3358,7 @@ static int __igc_open(struct net_device *netdev, bool resuming)
>   		goto err_req_irq;
>   
>   	/* Notify the stack of the actual queue counts. */
> -	netif_set_real_num_tx_queues(netdev, adapter->num_tx_queues);
> +	err = netif_set_real_num_tx_queues(netdev, adapter->num_tx_queues);
>   	if (err)
>   		goto err_set_queues;
>   
> 
Thanks for the patch. Good catch of my typo.

Acked-by: Sasha Neftin <sasha.neftin@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [Intel-wired-lan] [PATCH][next] igc: fix error return handling from call to netif_set_real_num_tx_queues
  2018-10-19 18:16 [PATCH][next] igc: fix error return handling from call to netif_set_real_num_tx_queues Colin King
  2018-10-24 10:38 ` Neftin, Sasha
@ 2018-11-01 19:26 ` Brown, Aaron F
  1 sibling, 0 replies; 3+ messages in thread
From: Brown, Aaron F @ 2018-11-01 19:26 UTC (permalink / raw)
  To: Colin King, Neftin, Sasha, Kirsher, Jeffrey T, David S . Miller,
	intel-wired-lan@lists.osuosl.org
  Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On
> Behalf Of Colin King
> Sent: Friday, October 19, 2018 11:16 AM
> To: Neftin, Sasha <sasha.neftin@intel.com>; Kirsher, Jeffrey T
> <jeffrey.t.kirsher@intel.com>; David S . Miller <davem@davemloft.net>;
> intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH][next] igc: fix error return handling from
> call to netif_set_real_num_tx_queues
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> The call to netif_set_real_num_tx_queues is not assigning the error
> return to variable err even though the next line checks err for an
> error.  Fix this by adding the missing err assignment.
> 
> Detected by CoverityScan, CID#1474551 ("Logically dead code")
> 
> Fixes: 3df25e4c1e66 ("igc: Add interrupt support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/net/ethernet/intel/igc/igc_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-02  4:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-19 18:16 [PATCH][next] igc: fix error return handling from call to netif_set_real_num_tx_queues Colin King
2018-10-24 10:38 ` Neftin, Sasha
2018-11-01 19:26 ` [Intel-wired-lan] " Brown, Aaron F

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).