From patchwork Wed Nov 23 09:55:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ye Bin X-Patchwork-Id: 628131 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 40C2EC4332F for ; Wed, 23 Nov 2022 09:37:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237329AbiKWJhQ (ORCPT ); Wed, 23 Nov 2022 04:37:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237668AbiKWJgb (ORCPT ); Wed, 23 Nov 2022 04:36:31 -0500 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47ABD1144A2; Wed, 23 Nov 2022 01:33:56 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4NHGCf0tXrz4f3jqj; Wed, 23 Nov 2022 17:33:50 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP4 (Coremail) with SMTP id gCh0CgAnmdYA6X1j0LUOBA--.21740S4; Wed, 23 Nov 2022 17:33:53 +0800 (CST) From: Ye Bin To: ulf.hansson@linaro.org, wsa+renesas@sang-engineering.com, kvalo@kernel.org, adrian.hunter@intel.com, linux-mmc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, yebin10@huawei.com Subject: [PATCH] mmc: mmc_test: fix missing assignment of 'file' when register debugfs file Date: Wed, 23 Nov 2022 17:55:06 +0800 Message-Id: <20221123095506.1965691-1-yebin@huaweicloud.com> X-Mailer: git-send-email 2.31.1 MIME-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xhlfz01xgou0bp/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Ye Bin Now, 'file' is always NULL. obviously, 'file' is used to store return value of 'debugfs_create_file()'. Fixes: a04c50aaa916 ("mmc: core: no need to check return value of debugfs_create functions") Signed-off-by: Ye Bin Acked-by: Adrian Hunter --- drivers/mmc/core/mmc_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/mmc_test.c b/drivers/mmc/core/mmc_test.c index 6cd6f8a94a71..156d34b2ed4d 100644 --- a/drivers/mmc/core/mmc_test.c +++ b/drivers/mmc/core/mmc_test.c @@ -3174,7 +3174,8 @@ static int __mmc_test_register_dbgfs_file(struct mmc_card *card, struct mmc_test_dbgfs_file *df; if (card->debugfs_root) - debugfs_create_file(name, mode, card->debugfs_root, card, fops); + file = debugfs_create_file(name, mode, card->debugfs_root, + card, fops); df = kmalloc(sizeof(*df), GFP_KERNEL); if (!df) {