diff mbox series

[RESEND] media: mtk-vcodec: vdec: remove redundant 'pfb' assignment

Message ID 20211110075611.3952962-1-tzungbi@google.com (mailing list archive)
State New, archived
Headers show
Series [RESEND] media: mtk-vcodec: vdec: remove redundant 'pfb' assignment | expand

Commit Message

Tzung-Bi Shih Nov. 10, 2021, 7:56 a.m. UTC
A clang-analyzer warning was reported.

>> drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18:
   warning: Value stored to 'pfb' during its initialization is never
   read [clang-analyzer-deadcode.DeadStores]

            struct vdec_fb *pfb = &framebuf->frame_buffer;
                            ^~~   ~~~~~~~~~~~~~~~~~~~~~~~

Removes the redundant 'pfb' assignment to fix.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c
index 8f4a1f0a0769..3d9f47555884 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c
@@ -133,7 +133,6 @@  static struct vdec_fb *vdec_get_cap_buffer(struct mtk_vcodec_ctx *ctx,
 	struct vdec_fb *pfb = &framebuf->frame_buffer;
 	struct vb2_buffer *dst_buf = &vb2_v4l2->vb2_buf;
 
-	pfb = &framebuf->frame_buffer;
 	pfb->base_y.va = NULL;
 	pfb->base_y.dma_addr = vb2_dma_contig_plane_dma_addr(dst_buf, 0);
 	pfb->base_y.size = ctx->q_data[MTK_Q_DATA_DST].sizeimage[0];