[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160819.180755.2123553442134312293.davem@davemloft.net>
Date: Fri, 19 Aug 2016 18:07:55 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: vegard.nossum@...cle.com
Cc: samuel@...tiz.org, irda-users@...ts.sourceforge.net,
netdev@...r.kernel.org
Subject: Re: [PATCH] net/irda: remove pointless assignment/check
From: Vegard Nossum <vegard.nossum@...cle.com>
Date: Fri, 19 Aug 2016 18:08:57 +0200
> We've already set sk to sock->sk and dereferenced it, so if it's NULL
> we would have crashed already. Moreover, if it was NULL we would have
> crashed anyway when jumping to 'out' and trying to unlock the sock.
> Furthermore, if we had assigned a different value to 'sk' we would
> have been calling lock_sock() and release_sock() on different sockets.
>
> My conclusion is that these two lines are complete nonsense and only
> serve to confuse the reader.
>
> Signed-off-by: Vegard Nossum <vegard.nossum@...cle.com>
Applied.
Powered by blists - more mailing lists