From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next v2] netdevsim: remove return value check of debugfs_create_dir Date: Fri, 08 Dec 2017 10:46:13 -0500 (EST) Message-ID: <20171208.104613.2285331206958244059.davem@davemloft.net> References: <20171208053218.4536-1-bhole_prashant_q7@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jakub.kicinski@netronome.com To: bhole_prashant_q7@lab.ntt.co.jp Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:54880 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754026AbdLHPqO (ORCPT ); Fri, 8 Dec 2017 10:46:14 -0500 In-Reply-To: <20171208053218.4536-1-bhole_prashant_q7@lab.ntt.co.jp> Sender: netdev-owner@vger.kernel.org List-ID: From: Prashant Bhole Date: Fri, 8 Dec 2017 14:32:18 +0900 > Reason: > Discussion started about adding error check on return value where > it was not handled. Also handling the error using IS_ERR_OR_NULL > instead of IS_ERR(), because debugfs_create_dir() doesn't return > error. It returns NULL or a valid pointer when DebugFS is enabled. > > Finally it was decided to remove error handling altogether to > make it consistent and removal of this check isn't fatal to the driver. > > Signed-off-by: Prashant Bhole I'm not apply this. If it fails with NULL at init time the will potentially place all the netdevsim device files in the ROOT of debugfs which is strongly undesriable. Check the errors, fix the debugfs interface error return semantics, and make errors fatal for module load. Thank you.