All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath6kl: Make use of return value from ath6kl_diag_read()
@ 2012-07-11  7:21 Pandiyarajan Pitchaimuthu
  2012-07-12  7:12 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Pandiyarajan Pitchaimuthu @ 2012-07-11  7:21 UTC (permalink / raw)
  To: linux-wireless

In ath6kl_read_fwlogs(), return value from ath6kl_diag_read()is not
used to bail out in case of any errors in reading fw log. No real issue
is observed because of this, reported by source code analyzer.

Signed-off-by: Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/main.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index c189e28..d01cb36 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -293,13 +293,17 @@ int ath6kl_read_fwlogs(struct ath6kl *ar)
 	}
 
 	address = TARG_VTOP(ar->target_type, debug_hdr_addr);
-	ath6kl_diag_read(ar, address, &debug_hdr, sizeof(debug_hdr));
+	ret = ath6kl_diag_read(ar, address, &debug_hdr, sizeof(debug_hdr));
+	if (ret)
+		goto out;
 
 	address = TARG_VTOP(ar->target_type,
 			    le32_to_cpu(debug_hdr.dbuf_addr));
 	firstbuf = address;
 	dropped = le32_to_cpu(debug_hdr.dropped);
-	ath6kl_diag_read(ar, address, &debug_buf, sizeof(debug_buf));
+	ret = ath6kl_diag_read(ar, address, &debug_buf, sizeof(debug_buf));
+	if (ret)
+		goto out;
 
 	loop = 100;
 
@@ -322,7 +326,7 @@ int ath6kl_read_fwlogs(struct ath6kl *ar)
 
 		address = TARG_VTOP(ar->target_type,
 				    le32_to_cpu(debug_buf.next));
-		ath6kl_diag_read(ar, address, &debug_buf, sizeof(debug_buf));
+		ret = ath6kl_diag_read(ar, address, &debug_buf, sizeof(debug_buf));
 		if (ret)
 			goto out;
 
-- 
1.7.9.5


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

* Re: [PATCH] ath6kl: Make use of return value from ath6kl_diag_read()
  2012-07-11  7:21 [PATCH] ath6kl: Make use of return value from ath6kl_diag_read() Pandiyarajan Pitchaimuthu
@ 2012-07-12  7:12 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2012-07-12  7:12 UTC (permalink / raw)
  To: Pandiyarajan Pitchaimuthu; +Cc: linux-wireless, ath6kl-devel

On 07/11/2012 10:21 AM, Pandiyarajan Pitchaimuthu wrote:
> In ath6kl_read_fwlogs(), return value from ath6kl_diag_read()is not
> used to bail out in case of any errors in reading fw log. No real issue
> is observed because of this, reported by source code analyzer.
> 
> Signed-off-by: Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com>

Thanks, applied. I just fixed a checkpatch warning about too long line.

But please CC ath6kl-devel and kvalo@qca.qualcomm.com when submitting
ath6kl patches. It makes it easier for me to track patches.

Kalle

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

end of thread, other threads:[~2012-07-12  7:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-11  7:21 [PATCH] ath6kl: Make use of return value from ath6kl_diag_read() Pandiyarajan Pitchaimuthu
2012-07-12  7:12 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.