Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6059668rwd; Wed, 24 May 2023 10:11:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6NXD1EkL+NYf266ptHM+7Q6bs7iW5eonoG6TKuGZTA9ihj6jGiJKwQji/7I2b6FbyQ+Ktk X-Received: by 2002:a17:902:a989:b0:1af:e63f:5bb1 with SMTP id bh9-20020a170902a98900b001afe63f5bb1mr1941148plb.7.1684948281985; Wed, 24 May 2023 10:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684948281; cv=none; d=google.com; s=arc-20160816; b=totgzHnJRRiC3PV8sIZYj02Oroeg8ZlQreG7zZSE5kK3HdKTyALqbhoZen5tCoJYfR DdltjCGjcxuFxY821WCikiTR6PNeJB3eE1z1V5zldtGnPQWj0bld03dD7kvVwhACCFiI n7G8q4C+OqI+hvOgRlNiB0A8u9UYodV+AUgcyMMU7Hwl3O9WVxVZe0MbJ5b4z+muBJ/l UtQ3wFAi2AFX/J9RKzNA5zNCqebJxXBljCsZyFXaPisD3g0NXY7Rt7lTahDsbTkU2r1V W8YNl5g31zNEt+U1x7FV8dh4ZSEPnyN8oAr1iE+gBJBH7KDY80P/flUUFIiUt8tqtJvN G8LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=U9CuijodwmqfQEn0tXnJ/TJge8dao1nUkPKEeKc5bsE=; b=ezKz47FtV3/EvFo9ea5/7U8+onohDtA3FwpnwQCmUNKrPlyupgyDZk87GrLA220i3m l+9tzOlHCQQt83iS3k6HtV9DrCGqcJ5uuzqJhukaNdnB+BVYK4vjLi+IKJRNBowL7cNx NOWC5QZL4xD+LtygQ7K4dSxHVBtsTTKwzV8dYTIfPBMJapRIexz87bjR0RLWbvMCXKd5 LQI1En61Bg/TLTmDA0LqTCVxn1twIEwZSJCv4zxShRyzeSModPV9xmCcxGZ0uvQMI93/ 7hDTXgnLoK8ktu+Iuk+0WQ4zDzhe2gWzjydynKimpYr60CNXipg65A+izsARNIHR3fbs Yc5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=LVUlJKuV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k70-20020a638449000000b005347d73e09csi1128390pgd.837.2023.05.24.10.11.10; Wed, 24 May 2023 10:11:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=LVUlJKuV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234415AbjEXQnI (ORCPT + 99 others); Wed, 24 May 2023 12:43:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbjEXQnH (ORCPT ); Wed, 24 May 2023 12:43:07 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2CE2E9; Wed, 24 May 2023 09:43:05 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4f3ba703b67so1186854e87.1; Wed, 24 May 2023 09:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684946584; x=1687538584; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=U9CuijodwmqfQEn0tXnJ/TJge8dao1nUkPKEeKc5bsE=; b=LVUlJKuVYlpNMW29XV3jIECyQbFSj3bWTETGmb0R7CzhXjzDlD1rY7l1WrmnBwJWmn BnzibY/ek5gOXN6RjrLK87SBPwLYR2LrltbfKJoUGK/cRexkw+rrWeDaMNxaper/nNBz zkotIqK3UH+JV8bH+7kbCpixIEWeFwFeg3GPCOuzmuct7fLYiD73qsmFdk3strrS6AQz o+V02g+WuJ1enKw+GN+nrvHbZFU4tcJPG0K6WYBGVTv6prrRpYs28cucuLpRrx1htlBF UHwC/Roc8OhXSx5TSWbC3vw012buikQq10F1vaFp7yh9/ef62Cuc1OySaHTWtrDuTOEN TrFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684946584; x=1687538584; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=U9CuijodwmqfQEn0tXnJ/TJge8dao1nUkPKEeKc5bsE=; b=KxPMNdr7qrD19u6A7rfvsOpmhcxyegJD/6mnO75Pe+rQSbW3UE6z2FYzZsxtPS9z78 olzhVsB6F1IrkIn+fZmonnUwn865kAPXGvDm92K9pNlx/mz9IoBV4CLorJBa+/wyh0Tp eQUWmDCirNz3K8q8K2XmUVgYh0NuoySQh/DD6LDrAmSy7y22Azdizj1RcKtBoFtr/l7E G0kY1D56oM6B3mZLf+ZGqtbfD21xaoofIxD/M6QkXDeCvzYoNA0x3QqyC/pXmkpIKi6P RNRy0MW7KGmczsvAI9pnNph/rjRrdCossEjvylmfMkR0iEKdeLQKXMORR8YBVlJP950Y vWug== X-Gm-Message-State: AC+VfDy2DDUL4yCo7L2LookKsOQVc+3afqJed+ZIAVqJ4+7IV1qlmcv5 nfrRLPmTOvNfMFhoLJs7//Q= X-Received: by 2002:ac2:414a:0:b0:4e9:59cd:416c with SMTP id c10-20020ac2414a000000b004e959cd416cmr4242690lfi.0.1684946583693; Wed, 24 May 2023 09:43:03 -0700 (PDT) Received: from Osmten.. ([103.84.150.66]) by smtp.gmail.com with ESMTPSA id a18-20020a05651c011200b002ab0c9fab23sm2143689ljb.79.2023.05.24.09.43.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 09:43:03 -0700 (PDT) From: Osama Muhammad To: mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Osama Muhammad Subject: [PATCH] smsdvb-debugfs.c: Fix error checking for debugfs_create_file Date: Wed, 24 May 2023 21:42:10 +0500 Message-Id: <20230524164210.20567-1-osmtendev@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes the error checking in smsdvb-debugfs.c in debugfs_create_file. The correct way to check if an error occurred is using 'IS_ERR_OR_NULL' inline function. Signed-off-by: Osama Muhammad --- drivers/media/common/siano/smsdvb-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/common/siano/smsdvb-debugfs.c b/drivers/media/common/siano/smsdvb-debugfs.c index 8916bb644756..0f8750d7993c 100644 --- a/drivers/media/common/siano/smsdvb-debugfs.c +++ b/drivers/media/common/siano/smsdvb-debugfs.c @@ -469,7 +469,7 @@ int smsdvb_debugfs_create(struct smsdvb_client_t *client) d = debugfs_create_file("stats", S_IRUGO | S_IWUSR, client->debugfs, client, &debugfs_stats_ops); - if (!d) { + if (IS_ERR_OR_NULL(d)) { debugfs_remove(client->debugfs); return -ENOMEM; } -- 2.34.1