linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: wfx: fix warning of using plain integer
@ 2019-11-02  0:14 Jules Irenge
  2019-11-02 10:39 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Jules Irenge @ 2019-11-02  0:14 UTC (permalink / raw)
  To: outreachy-kernel
  Cc: jerome.pouiller, gregkh, Boqun.Feng, linux-kernel, Jules Irenge

Fix warning of using plain integer as NULL pointer.
Issue reported by sparse tool.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 drivers/staging/wfx/queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c
index ef3ee55cf621..5d29bce65f71 100644
--- a/drivers/staging/wfx/queue.c
+++ b/drivers/staging/wfx/queue.c
@@ -565,7 +565,7 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
 		}
 
 		if (ret)
-			return 0;
+			return NULL;
 
 		queue_num = queue - wdev->tx_queue;
 
-- 
2.21.0


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

* Re: [PATCH] staging: wfx: fix warning of using plain integer
  2019-11-02  0:14 [PATCH] staging: wfx: fix warning of using plain integer Jules Irenge
@ 2019-11-02 10:39 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-11-02 10:39 UTC (permalink / raw)
  To: Jules Irenge
  Cc: outreachy-kernel, jerome.pouiller, gregkh, Boqun.Feng, linux-kernel

On Sat, Nov 02, 2019 at 12:14:57AM +0000, Jules Irenge wrote:
> Fix warning of using plain integer as NULL pointer.
> Issue reported by sparse tool.
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
> ---
>  drivers/staging/wfx/queue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c
> index ef3ee55cf621..5d29bce65f71 100644
> --- a/drivers/staging/wfx/queue.c
> +++ b/drivers/staging/wfx/queue.c
> @@ -565,7 +565,7 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
>  		}
>  
>  		if (ret)
> -			return 0;
> +			return NULL;
>  
>  		queue_num = queue - wdev->tx_queue;
>  
> -- 
> 2.21.0
> 

Please send this as part of a patch series, with your other changes to
this driver.

thanks,

greg k-h

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

end of thread, other threads:[~2019-11-02 10:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-02  0:14 [PATCH] staging: wfx: fix warning of using plain integer Jules Irenge
2019-11-02 10:39 ` Greg KH

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