All of lore.kernel.org
 help / color / mirror / Atom feed
* re: NFC: Initial LLCP support
@ 2011-12-16 20:26 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2011-12-16 20:26 UTC (permalink / raw)
  To: sameo; +Cc: linux-wireless, netdev

Hello Samuel Ortiz,

This is a semi-automatic email about new static checker warnings.

The patch d646960f7986: "NFC: Initial LLCP support" from Dec 14, 
2011, leads to the following Smatch complaint:

net/nfc/llcp/sock.c +47 llcp_sock_bind()
	 warn: variable dereferenced before check 'addr' (see line 45)

net/nfc/llcp/sock.c
    44	
    45		pr_debug("sk %p addr %p family %d\n", sk, addr, addr->sa_family);
                                                                ^^^^^^^^^^^^^^^
New dereference.

    46	
    47		if (!addr || addr->sa_family != AF_NFC)
                     ^^^^
New check.

    48			return -EINVAL;
    49	

regards,
dan carpenter


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

* re: NFC: Initial LLCP support
@ 2011-12-16 20:26 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2011-12-16 20:26 UTC (permalink / raw)
  To: sameo-VuQAYsv1563Yd54FQh9/CA
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA

Hello Samuel Ortiz,

This is a semi-automatic email about new static checker warnings.

The patch d646960f7986: "NFC: Initial LLCP support" from Dec 14, 
2011, leads to the following Smatch complaint:

net/nfc/llcp/sock.c +47 llcp_sock_bind()
	 warn: variable dereferenced before check 'addr' (see line 45)

net/nfc/llcp/sock.c
    44	
    45		pr_debug("sk %p addr %p family %d\n", sk, addr, addr->sa_family);
                                                                ^^^^^^^^^^^^^^^
New dereference.

    46	
    47		if (!addr || addr->sa_family != AF_NFC)
                     ^^^^
New check.

    48			return -EINVAL;
    49	

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: NFC: Initial LLCP support
  2011-12-16 20:26 ` Dan Carpenter
  (?)
@ 2012-05-21 13:32 ` Dan Carpenter
  -1 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2012-05-21 13:32 UTC (permalink / raw)
  To: sameo; +Cc: linux-wireless

On Fri, Dec 16, 2011 at 11:26:59PM +0300, Dan Carpenter wrote:
> Hello Samuel Ortiz,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch d646960f7986: "NFC: Initial LLCP support" from Dec 14, 
> 2011, leads to the following Smatch complaint:
> 
> net/nfc/llcp/sock.c +47 llcp_sock_bind()
> 	 warn: variable dereferenced before check 'addr' (see line 45)
> 
> net/nfc/llcp/sock.c
>     44	
>     45		pr_debug("sk %p addr %p family %d\n", sk, addr, addr->sa_family);
>                                                                 ^^^^^^^^^^^^^^^
> New dereference.
> 
>     46	
>     47		if (!addr || addr->sa_family != AF_NFC)
>                      ^^^^
> New check.
> 

This got lost in the holiday season.  Probably the check can just be
remove, yes?

regards,
dan carpenter

>     48			return -EINVAL;
>     49	
> 
> regards,
> dan carpenter
> 

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

end of thread, other threads:[~2012-05-21 13:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-16 20:26 NFC: Initial LLCP support Dan Carpenter
2011-12-16 20:26 ` Dan Carpenter
2012-05-21 13:32 ` Dan Carpenter

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.