]> xenbits.xensource.com Git - people/aperard/linux.git/commitdiff
media: pvrusb2: remove redundant NULL check
authorDaniil Dulov <d.dulov@aladdin.ru>
Sun, 11 Feb 2024 15:07:25 +0000 (07:07 -0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:20:49 +0000 (18:20 -0400)
[ 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: c74e0062684b ("V4L/DVB (5059): Pvrusb2: Be smarter about mode restoration")
Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c

index c04ab7258d645266c05bf9adc117566e9a1d962e..d195bd6a2248b93952cc85446aa5c316ac5e7e48 100644 (file)
@@ -1198,11 +1198,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;