summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2022-04-24 18:47:20 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-11-25 13:01:11 +0300
commitaf0dc3b0afae85941338aae9d6d3c1f0904d9979 (patch)
treed5bc7a3adf7c629da17ea7e587b4be0cdad052a2 /drivers/media
parenta15fe8d9f1bf460a804bcf18a890bfd2cf0d5caa (diff)
downloadlinux-af0dc3b0afae85941338aae9d6d3c1f0904d9979.tar.xz
media: dvbdev: remove redundant initialization of variable ret
Variable ret is being ininitialized with a value that is never read. The ininitializtion is redundant and can be removed. Move the variable to the scope it is required. Link: https://lore.kernel.org/linux-media/20220424154720.1356873-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb-core/dvbdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index 675d877a67b2..d5a142ef9876 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -243,7 +243,7 @@ static void dvb_media_device_free(struct dvb_device *dvbdev)
static int dvb_create_tsout_entity(struct dvb_device *dvbdev,
const char *name, int npads)
{
- int i, ret = 0;
+ int i;
dvbdev->tsout_pads = kcalloc(npads, sizeof(*dvbdev->tsout_pads),
GFP_KERNEL);
@@ -260,6 +260,7 @@ static int dvb_create_tsout_entity(struct dvb_device *dvbdev,
for (i = 0; i < npads; i++) {
struct media_pad *pads = &dvbdev->tsout_pads[i];
struct media_entity *entity = &dvbdev->tsout_entity[i];
+ int ret;
entity->name = kasprintf(GFP_KERNEL, "%s #%d", name, i);
if (!entity->name)