From: Mohammed Anees <pvmohammedanees2003@gmail.com>
To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Sebastian Fricke <sebastian.fricke@collabora.com>,
Moudy Ho <moudy.ho@mediatek.com>,
Ricardo Ribalda <ribalda@chromium.org>,
Mohammed Anees <pvmohammedanees2003@gmail.com>
Subject: [PATCH] media: platform: mtk-mdp3: Remove unwanted else in mdp-cmdp-prepare()
Date: Wed, 16 Oct 2024 17:08:08 +0530 [thread overview]
Message-ID: <20241016113808.4311-1-pvmohammedanees2003@gmail.com> (raw)
Since platform compatibility is already verified, the
additional else branch is unnecessary and will never
be executed. To fix, remove this else condition.
Signed-off-by: Mohammed Anees <pvmohammedanees2003@gmail.com>
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
index ea2ea119dd2a..168beed4155a 100644
--- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
+++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
@@ -624,14 +624,11 @@ static struct mdp_cmdq_cmd *mdp_cmdq_prepare(struct mdp_dev *mdp,
if (ret)
goto err_free_cmd;
- if (CFG_CHECK(MT8183, p_id)) {
+ if (CFG_CHECK(MT8183, p_id))
num_comp = CFG_GET(MT8183, param->config, num_components);
- } else if (CFG_CHECK(MT8195, p_id)) {
+ else if (CFG_CHECK(MT8195, p_id))
num_comp = CFG_GET(MT8195, param->config, num_components);
- } else {
- ret = -EINVAL;
- goto err_destroy_pkt;
- }
+
comps = kcalloc(num_comp, sizeof(*comps), GFP_KERNEL);
if (!comps) {
ret = -ENOMEM;
--
2.47.0
next reply other threads:[~2024-10-16 11:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 11:38 Mohammed Anees [this message]
2024-10-17 13:39 ` [PATCH] media: platform: mtk-mdp3: Remove unwanted else in mdp-cmdp-prepare() AngeloGioacchino Del Regno
2024-10-17 20:21 ` Mohammed Anees
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=20241016113808.4311-1-pvmohammedanees2003@gmail.com \
--to=pvmohammedanees2003@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=moudy.ho@mediatek.com \
--cc=ribalda@chromium.org \
--cc=sebastian.fricke@collabora.com \
/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;
as well as URLs for NNTP newsgroup(s).