netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args
@ 2015-12-29 19:29 Insu Yun
  2015-12-29 19:46 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Insu Yun @ 2015-12-29 19:29 UTC (permalink / raw)
  To: Dept-GELinuxNICDev, netdev, linux-kernel
  Cc: taesoo, yeongjin.jang, insu, changwoo, Insu Yun

Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
index a5f422f..a9a2c33 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
@@ -772,8 +772,10 @@ int qlcnic_82xx_config_intrpt(struct qlcnic_adapter *adapter, u8 op_type)
 	int i, err = 0;
 
 	for (i = 0; i < ahw->num_msix; i++) {
-		qlcnic_alloc_mbx_args(&cmd, adapter,
+		err = qlcnic_alloc_mbx_args(&cmd, adapter,
 				      QLCNIC_CMD_MQ_TX_CONFIG_INTR);
+		if (err)
+			return err;
 		type = op_type ? QLCNIC_INTRPT_ADD : QLCNIC_INTRPT_DEL;
 		val = type | (ahw->intr_tbl[i].type << 4);
 		if (ahw->intr_tbl[i].type == QLCNIC_INTRPT_MSIX)
-- 
1.9.1

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

* Re: [PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args
  2015-12-29 19:29 Insu Yun
@ 2015-12-29 19:46 ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-12-29 19:46 UTC (permalink / raw)
  To: wuninsu
  Cc: Dept-GELinuxNICDev, netdev, linux-kernel, taesoo, yeongjin.jang,
	insu, changwoo

From: Insu Yun <wuninsu@gmail.com>
Date: Tue, 29 Dec 2015 14:29:47 -0500

> Signed-off-by: Insu Yun <wuninsu@gmail.com>
> ---
>  drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
> index a5f422f..a9a2c33 100644
> --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
> +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
> @@ -772,8 +772,10 @@ int qlcnic_82xx_config_intrpt(struct qlcnic_adapter *adapter, u8 op_type)
>  	int i, err = 0;
>  
>  	for (i = 0; i < ahw->num_msix; i++) {
> -		qlcnic_alloc_mbx_args(&cmd, adapter,
> +		err = qlcnic_alloc_mbx_args(&cmd, adapter,
>  				      QLCNIC_CMD_MQ_TX_CONFIG_INTR);

You must fix the indentation of the second line of the function call when
you made changes like this.  The first character on the second line of the
call must be exactly at the first column after the openning parenthesis of
the first line.

You must must the appropriate number of TAB and then SPACE characters
necessary to achieve this.

Thanks.

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

* [PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args
@ 2015-12-29 20:02 Insu Yun
  2016-01-04 22:14 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Insu Yun @ 2015-12-29 20:02 UTC (permalink / raw)
  To: Dept-GELinuxNICDev, netdev, linux-kernel
  Cc: taesoo, yeongjin.jang, insu, changwoo, Insu Yun

Since qlcnic_alloc_mbx_args can be failed, 
return value should be checked.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
index a5f422f..daf0515 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
@@ -772,8 +772,10 @@ int qlcnic_82xx_config_intrpt(struct qlcnic_adapter *adapter, u8 op_type)
 	int i, err = 0;
 
 	for (i = 0; i < ahw->num_msix; i++) {
-		qlcnic_alloc_mbx_args(&cmd, adapter,
-				      QLCNIC_CMD_MQ_TX_CONFIG_INTR);
+		err = qlcnic_alloc_mbx_args(&cmd, adapter,
+					    QLCNIC_CMD_MQ_TX_CONFIG_INTR);
+		if (err)
+			return err;
 		type = op_type ? QLCNIC_INTRPT_ADD : QLCNIC_INTRPT_DEL;
 		val = type | (ahw->intr_tbl[i].type << 4);
 		if (ahw->intr_tbl[i].type == QLCNIC_INTRPT_MSIX)
-- 
1.9.1

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

* Re: [PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args
  2015-12-29 20:02 [PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args Insu Yun
@ 2016-01-04 22:14 ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-01-04 22:14 UTC (permalink / raw)
  To: wuninsu
  Cc: Dept-GELinuxNICDev, netdev, linux-kernel, taesoo, yeongjin.jang,
	insu, changwoo

From: Insu Yun <wuninsu@gmail.com>
Date: Tue, 29 Dec 2015 15:02:18 -0500

> Since qlcnic_alloc_mbx_args can be failed, 
> return value should be checked.
> 
> Signed-off-by: Insu Yun <wuninsu@gmail.com>

Applied, thanks.

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

end of thread, other threads:[~2016-01-04 22:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-29 20:02 [PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args Insu Yun
2016-01-04 22:14 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2015-12-29 19:29 Insu Yun
2015-12-29 19:46 ` David Miller

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).