From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 978471867 for ; Fri, 8 Sep 2023 07:48:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB9A3C433C9; Fri, 8 Sep 2023 07:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694159324; bh=Va9oW2IS2vwCCdtwShgla+tG9l24+uA44GRCVlSILF8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M8Z/5JHrtwOUerhCcbTEW3SjhxuaF3Q337pc/PK4flGfuXERJeE/gadHGk/1mDJsm P/xoRzFmBSIWoKIqJEPaEHoMKi2no/bxgAcm7frGSVNOiZvndGFHBcp5r5QBpglH5o BUGvk/8B6h8nAeM7RpyTAFVzQ8GvQIVdzNp8vz6uQUxXk+HlMrM5LrQ+apjLAilKyk SiNk3MngsLHjnJgnew36htD3cF2YnsAE238KehotFRJxWRyQbayNxBr1wMOBskkiet vxaz8HBvltZMbxm9sPZnRyQbbZb3OFI2I8cUGPLXVH0gAAC2H5sNnHkQakxFNMvDmc JmkOXKGaRABdA== Date: Fri, 8 Sep 2023 09:48:39 +0200 From: Simon Horman To: Dan Carpenter Cc: Lars Povlsen , Horatiu Vultur , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH net-next] net: microchip: sparx5: clean up error checking in vcap_show_admin() Message-ID: <20230908074839.GL434333@kernel.org> References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Sep 08, 2023 at 10:03:37AM +0300, Dan Carpenter wrote: > The vcap_decode_rule() never returns NULL. There is no need to check > for that. This code assumes that if it did return NULL we should > end abruptly and return success. It is confusing. Fix the check to > just be if (IS_ERR()) instead of if (IS_ERR_OR_NULL()). > > Reported-by: kernel test robot > Closes: https://lore.kernel.org/r/202309070831.hTvj9ekP-lkp@intel.com/ > Signed-off-by: Dan Carpenter > --- > This bug is old, but it doesn't affect runtime so it should go to > net-next. Reviewed-by: Simon Horman