[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241016113808.4311-1-pvmohammedanees2003@gmail.com>
Date: Wed, 16 Oct 2024 17:08:08 +0530
From: Mohammed Anees <pvmohammedanees2003@...il.com>
To: linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Sebastian Fricke <sebastian.fricke@...labora.com>,
Moudy Ho <moudy.ho@...iatek.com>,
Ricardo Ribalda <ribalda@...omium.org>,
Mohammed Anees <pvmohammedanees2003@...il.com>
Subject: [PATCH] media: platform: mtk-mdp3: Remove unwanted else in mdp-cmdp-prepare()
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@...il.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
Powered by blists - more mailing lists