From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761937AbdEVTxY (ORCPT ); Mon, 22 May 2017 15:53:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45352 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759075AbdEVTxT (ORCPT ); Mon, 22 May 2017 15:53:19 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5BEC43B74A Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=marcelo.leitner@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5BEC43B74A Date: Mon, 22 May 2017 16:53:09 -0300 From: Marcelo Ricardo Leitner To: SF Markus Elfring Cc: linux-sctp@vger.kernel.org, netdev@vger.kernel.org, "David S. Miller" , Neil Horman , Vlad Yasevich , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH 5/5] sctp: Adjust one function call together with a variable assignment Message-ID: <20170522195308.GG4642@localhost.localdomain> References: <2845df67-d35d-536a-0a53-b2eb83fe1ba5@users.sourceforge.net> <197333e8-b528-ef34-bd16-01e415acdf52@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <197333e8-b528-ef34-bd16-01e415acdf52@users.sourceforge.net> User-Agent: Mutt/1.8.0 (2017-02-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 22 May 2017 19:53:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 22, 2017 at 06:41:45PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 22 May 2017 18:15:12 +0200 > > The script "checkpatch.pl" pointed information out like the following. > > ERROR: do not use assignment in if condition > > Thus fix the affected source code place. > > Signed-off-by: Markus Elfring Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/protocol.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c > index 057479b7bd72..be2fe3ebae78 100644 > --- a/net/sctp/protocol.c > +++ b/net/sctp/protocol.c > @@ -141,7 +141,8 @@ static void sctp_v4_copy_addrlist(struct list_head *addrlist, > struct sctp_sockaddr_entry *addr; > > rcu_read_lock(); > - if ((in_dev = __in_dev_get_rcu(dev)) == NULL) { > + in_dev = __in_dev_get_rcu(dev); > + if (!in_dev) { > rcu_read_unlock(); > return; > } > -- > 2.13.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-sctp" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >