From: Osama Muhammad <osmtendev@gmail.com>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH] aspeed-video.c: Fix error checking for debugfs_create_dir
Date: Wed, 24 May 2023 22:11:37 +0500 [thread overview]
Message-ID: <20230524171137.22128-1-osmtendev@gmail.com> (raw)
This patch fixes the error checking in aspeed-video.c in
debugfs_create_dir. The correct way to check if an error occurred
is using 'IS_ERR' inline function.
Signed-off-by: Osama Muhammad <osmtendev@gmail.com>
---
drivers/media/platform/aspeed/aspeed-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c
index 374eb7781936..97847f44964a 100644
--- a/drivers/media/platform/aspeed/aspeed-video.c
+++ b/drivers/media/platform/aspeed/aspeed-video.c
@@ -1976,7 +1976,7 @@ static int aspeed_video_debugfs_create(struct aspeed_video *video)
debugfs_entry = debugfs_create_file(DEVICE_NAME, 0444, NULL,
video,
&aspeed_video_debugfs_fops);
- if (!debugfs_entry)
+ if (IS_ERR(debugfs_entry))
aspeed_video_debugfs_remove(video);
return !debugfs_entry ? -EIO : 0;
--
2.34.1
next reply other threads:[~2023-05-24 17:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 17:11 Osama Muhammad [this message]
2023-05-30 14:18 ` [PATCH] aspeed-video.c: Fix error checking for debugfs_create_dir Eddie James
2023-05-30 14:18 ` Eddie James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230524171137.22128-1-osmtendev@gmail.com \
--to=osmtendev@gmail.com \
--cc=linux-aspeed@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.