From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode Date: Wed, 20 Jun 2018 14:31:47 +0900 (KST) Message-ID: <20180620.143147.2291173423483856091.davem@davemloft.net> References: <1529330677-15328-1-git-send-email-liuhangbin@gmail.com> <20180620032254.GW8958@leo.usersys.redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: xiyou.wangcong@gmail.com, netdev@vger.kernel.org, sbrivio@redhat.com, pabeni@redhat.com, maheshb@google.com To: liuhangbin@gmail.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:55388 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbeFTFbu (ORCPT ); Wed, 20 Jun 2018 01:31:50 -0400 In-Reply-To: <20180620032254.GW8958@leo.usersys.redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Hangbin Liu Date: Wed, 20 Jun 2018 11:22:54 +0800 > The only case dev_change_flags() return an err is when we change IFF_UP flag. > Since we only set/reset IFF_NOARP, do you think we still need to check the > return value? It is bad to try and take shortcuts on error handling using assumptions like that. If dev_change_flags() is adjusted to return error codes in more situations, nobody is going to remember to undo your "optimziation" here. Please check for errors, thank you.