Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9d391cc authored by Daniil Dulov's avatar Daniil Dulov Committed by Sasha Levin
Browse files

media: pvrusb2: remove redundant NULL check



[ Upstream commit 95ac1210fb2753f968ebce0730d4fbc553c2a3dc ]

Pointer dip->stream cannot be NULL due to a shift, thus remove redundant
NULL check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: c74e0062 ("V4L/DVB (5059): Pvrusb2: Be smarter about mode restoration")
Signed-off-by: default avatarDaniil Dulov <d.dulov@aladdin.ru>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 013fb505
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -1202,11 +1202,6 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
		dip->minor_type = pvr2_v4l_type_video;
		nr_ptr = video_nr;
		caps |= V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_AUDIO;
		if (!dip->stream) {
			pr_err(KBUILD_MODNAME
				": Failed to set up pvrusb2 v4l video dev due to missing stream instance\n");
			return;
		}
		break;
	case VFL_TYPE_VBI:
		dip->config = pvr2_config_vbi;