diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2021-12-10 03:47:21 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-12-14 16:19:04 +0100 |
commit | 9dd2444f2395f0b9edb4901be3909891ea51a1d9 (patch) | |
tree | 77f39aea8ab69322ab52b977a99a2485629601ca /drivers/media | |
parent | 5d6db4aa3c85e5dd76a7c48073472c70e68b8d13 (diff) |
media: vidtv: remove unneeded variable make code cleaner
return value form directly instead of
taking this in another redundant variable.
Link: https://lore.kernel.org/linux-media/20211210024721.425145-1-chi.minghao@zte.com.cn
Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/test-drivers/vidtv/vidtv_psi.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c b/drivers/media/test-drivers/vidtv/vidtv_psi.c index c11ac8dca73d..a5875380ef40 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_psi.c +++ b/drivers/media/test-drivers/vidtv/vidtv_psi.c @@ -94,34 +94,28 @@ static void vidtv_psi_update_version_num(struct vidtv_psi_table_header *h) static u16 vidtv_psi_get_sec_len(struct vidtv_psi_table_header *h) { u16 mask; - u16 ret; mask = GENMASK(11, 0); - ret = be16_to_cpu(h->bitfield) & mask; - return ret; + return be16_to_cpu(h->bitfield) & mask; } u16 vidtv_psi_get_pat_program_pid(struct vidtv_psi_table_pat_program *p) { u16 mask; - u16 ret; mask = GENMASK(12, 0); - ret = be16_to_cpu(p->bitfield) & mask; - return ret; + return be16_to_cpu(p->bitfield) & mask; } u16 vidtv_psi_pmt_stream_get_elem_pid(struct vidtv_psi_table_pmt_stream *s) { u16 mask; - u16 ret; mask = GENMASK(12, 0); - ret = be16_to_cpu(s->bitfield) & mask; - return ret; + return be16_to_cpu(s->bitfield) & mask; } static void vidtv_psi_set_desc_loop_len(__be16 *bitfield, u16 new_len, |