Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2002754rdb; Sun, 11 Feb 2024 07:07:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWQ86VfgzqpgU/99Gtb2V2z5kDvRHLkMa6HXkmBoHWqE6u5Dp8xWolYuqXLO98khpQw8vodgaOHn32ZQvDcMNNgFankFsiI+gcvPUoIkQ== X-Google-Smtp-Source: AGHT+IEHQqkCqZWK3VWBylpc5egJKgCjPqHb9NQMYZxhXrIvYvnsgXAX4VITDqNHFbAFLF3RkTcD X-Received: by 2002:a17:903:22ca:b0:1da:16d4:3726 with SMTP id y10-20020a17090322ca00b001da16d43726mr4789716plg.34.1707664064902; Sun, 11 Feb 2024 07:07:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707664064; cv=pass; d=google.com; s=arc-20160816; b=i3h8O/gOpD3vizxU76kmXhYL/zNAbZM+BP7fzQyn/EISBNsDmSckafa+39HgN1qoAD dFdjI4x/UzbRlUSamWmC0a06DHuvhbuAeRZh6sItGWoQiwaot5rLP8ac97ppSjjMc/Bh 9MBQQqwGar4VtNAAGOr34PGEGe//3/5AtK1nbTvmfRYDgt4A2aaJSd+PPqjXe5TmaG0e 9Qy5E2jxt/Q85sAvP1EjgErmAnrAutJd5Oq7uGIRDkfFr1cgP2Kln6C6d+UGlZ36gTv/ qiYmwlTALhBd1AkZPIZMhYTx891DIBx83kbijnrZzthSMWfYwQkxAx9g1RcCS6FBE9zo RrHA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=c3wRNMzm/sqGfafZGmgEhmR78vFgWdXnK1PlkFFUH2w=; fh=vsduPmGF7lIef6jWDDo02/ok0uoPCL3YThQNnGE/lmA=; b=tl9Un1TcQCkiZ0i3vqAiCqCWpavukkmO+qeIS1ABSxrM/6YDGclM12K2btbeFd1qim ZmGHk+QzTfuSW0xKI5OXKLwXwmtZ78FPJGGwPOwqsS0YAOz8om3l27U2yl0cPlvrlTrp 8OS8kChy4AcxcMrEcoDPfHNBMGJ03++ARcQ0bpK4qcOOZ7rFUumMDoE23OCzZ8e2WQQC l/6O+42Qf60lObVdznlOuA/vuxnwGy+VdYLjAY6j6MoFte8gtSpxmpgtoG7E2FSiOI1B xIg1wPH0x+QWDhkGFzd4n9hY6vcTfocnr2vY/LFNTIW6JOpDQ7EEq6dVBu/69n03ioST qKmQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aladdin.ru dmarc=pass fromdomain=aladdin.ru); spf=pass (google.com: domain of linux-kernel+bounces-60814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru X-Forwarded-Encrypted: i=2; AJvYcCXTHNFEdabKnnuxRvq4ChDP6y5959JyqbPrelbKo3QP4JSCx1HX3RFNJlFBxlebKcg84qk5RoQobynq7TiFGERxUp/tLaHoW9AcPDZ1Lw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x18-20020a170902ea9200b001d8e1d796e2si1240108plb.518.2024.02.11.07.07.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 07:07:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aladdin.ru dmarc=pass fromdomain=aladdin.ru); spf=pass (google.com: domain of linux-kernel+bounces-60814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 95C36282453 for ; Sun, 11 Feb 2024 15:07:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 622555B670; Sun, 11 Feb 2024 15:07:38 +0000 (UTC) Received: from mail-out.aladdin-rd.ru (mail-out.aladdin-rd.ru [91.199.251.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FB295A4C2; Sun, 11 Feb 2024 15:07:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.199.251.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707664057; cv=none; b=GSAjdmn7Vhjn72hGixJ/G4i/ofE7F4giw38UhF9cQZfn1nMA+III3jkZqYpjzvBC9axC1B2Wc1h7FOZ4amBn4YhvCUtC0jShA/XQKaio3zVMZBngj6FkFN2VkvNbpNzo3igclJZGha+6V4/PofVORFB/xlt4WRb+yRTUndLFa3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707664057; c=relaxed/simple; bh=S+ZcsTEYVGxi18jHqo41yCn7PEXa3hnMJnf6e88HqS0=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=KlkLFSXgRkq5GMqdMA0qhslThIiLtZB9d51Cv3xA/O5L7ylP8GPDMfl3Nm1hD4xFZMeDcGgS6RQwaGuuMwRj0BJF/jyNAlIL6U8QsyW5ZB+y0E53aRJTU056dPuY391yw0imic33qX29Fx5e9dwlm+U4p/ImE6ud8H637jlJjjE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru; spf=pass smtp.mailfrom=aladdin.ru; arc=none smtp.client-ip=91.199.251.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aladdin.ru From: Daniil Dulov To: Mike Isely CC: Daniil Dulov , Mauro Carvalho Chehab , , , Subject: [PATCH] media: pvrusb2: remove redundant NULL check Date: Sun, 11 Feb 2024 07:07:25 -0800 Message-ID: <20240211150725.3769-1-d.dulov@aladdin.ru> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EXCH-2016-01.aladdin.ru (192.168.1.101) To EXCH-2016-01.aladdin.ru (192.168.1.101) 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 --- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index 9657c1883311..c872868becbd 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c @@ -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; -- 2.25.1