linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: NFC: trf7970a: Handle timeout values of zero
@ 2014-10-01 14:20 Dan Carpenter
  2014-10-01 16:11 ` Mark A. Greer
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-10-01 14:20 UTC (permalink / raw)
  To: mgreer; +Cc: linux-wireless

Hello Mark A. Greer,

The patch 1961843ceeca: "NFC: trf7970a: Handle timeout values of
zero" from Sep 2, 2014, leads to the following static checker warning:

	drivers/nfc/trf7970a.c:897 trf7970a_irq()
	warn: passing zero to 'ERR_PTR'

drivers/nfc/trf7970a.c
   892                          trf7970a_cmd(trf, TRF7970A_CMD_FIFO_RESET);
   893  
   894                          if (!trf->timeout) {
   895                                  trf->ignore_timeout = !cancel_delayed_work(
   896                                                  &trf->timeout_work);
   897                                  trf->rx_skb = ERR_PTR(0);
                                                      ^^^^^^^^^^
Why not just say "NULL"?

   898                                  trf7970a_send_upstream(trf);
   899                                  break;
   900                          }

regards,
dan carpenter

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

* Re: NFC: trf7970a: Handle timeout values of zero
  2014-10-01 14:20 NFC: trf7970a: Handle timeout values of zero Dan Carpenter
@ 2014-10-01 16:11 ` Mark A. Greer
  0 siblings, 0 replies; 2+ messages in thread
From: Mark A. Greer @ 2014-10-01 16:11 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-wireless

On Wed, Oct 01, 2014 at 05:20:48PM +0300, Dan Carpenter wrote:
> Hello Mark A. Greer,
> 
> The patch 1961843ceeca: "NFC: trf7970a: Handle timeout values of
> zero" from Sep 2, 2014, leads to the following static checker warning:
> 
> 	drivers/nfc/trf7970a.c:897 trf7970a_irq()
> 	warn: passing zero to 'ERR_PTR'
> 
> drivers/nfc/trf7970a.c
>    892                          trf7970a_cmd(trf, TRF7970A_CMD_FIFO_RESET);
>    893  
>    894                          if (!trf->timeout) {
>    895                                  trf->ignore_timeout = !cancel_delayed_work(
>    896                                                  &trf->timeout_work);
>    897                                  trf->rx_skb = ERR_PTR(0);
>                                                       ^^^^^^^^^^
> Why not just say "NULL"?

No reason.  I thought I'd fixed them all.

Mark
--

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

end of thread, other threads:[~2014-10-01 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-01 14:20 NFC: trf7970a: Handle timeout values of zero Dan Carpenter
2014-10-01 16:11 ` Mark A. Greer

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