From: I Hsin Cheng <richard120310@gmail.com>
To: robin.clark@oss.qualcomm.com
Cc: lumag@kernel.org, abhinav.kumar@linux.dev,
jessica.zhang@oss.qualcomm.com, sean@poorly.run,
marijn.suijten@somainline.org, airlied@gmail.com,
simona@ffwll.ch, linux-arm-msm@vger.kernel.org,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
linux-kernel@vger.kernel.org, shuah@kernel.org,
linux-kernel-mentees@lists.linux.dev,
I Hsin Cheng <richard120310@gmail.com>
Subject: [RFC PATCH] drm/msm: Remove dead code in msm_ioctl_gem_submit()
Date: Tue, 24 Jun 2025 02:47:34 +0800 [thread overview]
Message-ID: <20250623184734.22947-1-richard120310@gmail.com> (raw)
According to the report of Coverity Scan [1], "sync_file" is going to be
NULL when entering the "if" section after "out_post_unlock", so
"fput(sync_file->file)" is never going to be exected in this block.
[1]: https://scan5.scan.coverity.com/#/project-view/10074/10063?selectedIssue=1655089
Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
---
drivers/gpu/drm/msm/msm_gem_submit.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
index d4f71bb54e84..cba1dc6fe6c6 100644
--- a/drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/drivers/gpu/drm/msm/msm_gem_submit.c
@@ -904,8 +904,6 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
out_post_unlock:
if (ret && (out_fence_fd >= 0)) {
put_unused_fd(out_fence_fd);
- if (sync_file)
- fput(sync_file->file);
}
if (!IS_ERR_OR_NULL(submit)) {
--
2.43.0
next reply other threads:[~2025-06-23 18:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 18:47 I Hsin Cheng [this message]
2025-07-01 19:38 ` [RFC PATCH] drm/msm: Remove dead code in msm_ioctl_gem_submit() Shuah Khan
2025-07-01 20:08 ` Rob Clark
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=20250623184734.22947-1-richard120310@gmail.com \
--to=richard120310@gmail.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jessica.zhang@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=shuah@kernel.org \
--cc=simona@ffwll.ch \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox