From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAEA9C001DC for ; Thu, 13 Jul 2023 09:54:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234560AbjGMJyD (ORCPT ); Thu, 13 Jul 2023 05:54:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234436AbjGMJxW (ORCPT ); Thu, 13 Jul 2023 05:53:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ECCD2698; Thu, 13 Jul 2023 02:53:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1C7E261A08; Thu, 13 Jul 2023 09:53:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8292DC433C7; Thu, 13 Jul 2023 09:53:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689242000; bh=klBkFqf3WWVIxTzQAmBLevppMzRmR9bTdaJ+8Xn2iA4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kOTOwakPg1sK5nA1JPCkRLlEhOHqnewpcIZ0wcYDHn/G2AKECvt2Du9i/cz2g2QjZ eq2C2uL8Lu5q8w65m4LxPt/yhXDcehreEPrYeTAaBMh7On7d2JRHggwPe2WENCAcpe EoJWvlmYTAuBv3CcT9P7uwmzlYurgWx5tBYuNY/8EjDt8N+hqj47iPhBlIYy6fMoeU Uo6aYXBKkUBgODDtmDNsGNLxVxXGvHla66CN0mLI5ireKCvwzRoHttqAWFD9Ogk4X8 n9uCSLPdZa9EyLuIBZnu9A5LLnWv1EtWNfLSLJqTbqFKJ21XJVFNoKf2IMvlo/hXp8 6Gf988mT7GD3w== Date: Thu, 13 Jul 2023 11:53:10 +0200 From: Andi Shyti To: Markus Elfring Cc: Minjie Du , linux-i2c@vger.kernel.org, kernel-janitors@vger.kernel.org, Wolfram Sang , opensource.kernel@vivo.com, LKML Subject: Re: [PATCH v3] i2c: busses: fix parameter check in i2c_gpio_fault_injector_init() Message-ID: <20230713095310.mafkoqrjwhm5r4mf@intel.intel> References: <20230713020517.614-1-duminjie@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Hi Markus, > > +++ b/drivers/i2c/busses/i2c-gpio.c > > @@ -265,7 +265,7 @@ static void i2c_gpio_fault_injector_init(struct platform_device *pdev) > > */ > > if (!i2c_gpio_debug_dir) { > > i2c_gpio_debug_dir = debugfs_create_dir("i2c-fault-injector", NULL); > > - if (!i2c_gpio_debug_dir) > > + if (IS_ERR(i2c_gpio_debug_dir)) > > return; > > } > > Will the development attention grow also for the exception handling > which is missing here so far? Well, it depends why you need to handle the error return. I think it's not important if this fails... the only reason I would handle the error here is to print a warning in dmesg. Thank you, Andi