From: Dan Carpenter <dan.carpenter@oracle.com>
To: wu000273@umn.edu
Cc: linux-media@vger.kernel.org
Subject: [bug report] media: ti-vpe: Fix a missing check and reference count leak
Date: Tue, 29 Sep 2020 13:19:42 +0300 [thread overview]
Message-ID: <20200929101942.GA490864@mwanda> (raw)
Hello Qiushi Wu,
The patch 7dae2aaaf432: "media: ti-vpe: Fix a missing check and
reference count leak" from Jun 14, 2020, leads to the following
static checker warning:
drivers/media/platform/ti-vpe/vpe.c:2478 vpe_runtime_get()
warn: pm_runtime_get_sync() also returns 1 on success
drivers/media/platform/ti-vpe/vpe.c
2470 static int vpe_runtime_get(struct platform_device *pdev)
2471 {
2472 int r;
2473
2474 dev_dbg(&pdev->dev, "vpe_runtime_get\n");
2475
2476 r = pm_runtime_get_sync(&pdev->dev);
2477 WARN_ON(r < 0);
2478 if (r)
2479 pm_runtime_put_noidle(&pdev->dev);
The pm_runtime_get_sync() function is tricky because it can return
either zero or one on the success path. (So this patch can break the
success path.)
2480 return r < 0 ? r : 0;
2481 }
regards,
dan carpenter
reply other threads:[~2020-09-29 10:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200929101942.GA490864@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-media@vger.kernel.org \
--cc=wu000273@umn.edu \
/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