Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2515050rdb; Mon, 12 Feb 2024 07:21:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXzyvmMyrJ7rILSwVjYHy82VE/QtBvsPEGngCX6N5S0026oQfzY/lJX2r8KrFp5SPcPJCITREXKZZEXmXrVTwPj2x4AYPW6PEoVo/ni4Q== X-Google-Smtp-Source: AGHT+IE651A8ZMECH00tpt3+F8DPPTwB/MxZHmKddLDir4WXAg+qe3vC6IHDjb9yDqiZKz8xilwh X-Received: by 2002:ac2:5f69:0:b0:511:878b:80c with SMTP id c9-20020ac25f69000000b00511878b080cmr3086865lfc.5.1707751264344; Mon, 12 Feb 2024 07:21:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707751264; cv=pass; d=google.com; s=arc-20160816; b=ChzrpD6biLTxaCgyP7dUC8Ygno7ATQXLAQFuvfGES//PdkuvYmgs8DAER9+UKbiYfk ag96SMrXQp6xznS9asi/5+QDRyA8ZIPcBjVjL+33tv1kET79L91aTQJhCEY1DQjY0Do6 a4k2oM3iM1iiIzUwGVySMTpasGZ2tt8qF8Rp7LuxJbMnYvE7zFcpy4tNjQxg3YEAIXxD kdvXJM6EUmqw7F5ilNUQjBT+52u8dhxtE9rKgAFZkq021SiUrXFJ45WlVgt7gg6eQ1f0 9dQNgMGQIMRM93uqcxO1CfKscwIV6VA012Wvpbt+htzGvCyZz9MZjpy14gk8+liTjv8J assg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id; bh=o7H7l8gp5ilFWgyNoRxvY70EFkOX9eHY3+A1GIFspNw=; fh=FiXGt8Fj/6Nxg7JlMoUTRvdQKXYcI4TTpaL38jeCU0s=; b=AdJ0l7TZLiydDq2HoKQuN+yt4qm5HQ1P1x94auTFFTyaFRV7XKFZdl3MTBqXl8za2+ jTocKf+2v7ercuLYZcL1Jk5Wx+AR2P/C6adfhqYglw4DOZwvwxtG/QxVzInqTjEP03UV A3o2wJRVya5p8Sg21mUfw7r7gTPP+CT/wNmvRBgFBei8MsUQIaog3YcK09pxc6SfV0cJ M7BKpgAVxHRcWAjoGzLvwvD/0K+IoaQmK5d5RP/12EtOIAplM9Igx/a/a9+zQ/8rTSG7 d5BEI9KY4AMJl2OLIRH/z99Ru6yqy2W3OQ8jCyTIfLpzQNGX9RILBi5B2k88XcFmicQy FnuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-61885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61885-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl X-Forwarded-Encrypted: i=2; AJvYcCWJRs1P5jcM0VfvTywTWVNMTSXfpmSgwrfCQhhqdYQNQCb5gIQQWeuEkdpK6FptEwdeu1GKrzrZd6tZVWomlllSwx+uJFZJ+I4NgLoRBw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id qb35-20020a1709077ea300b00a3cae7aae94si322381ejc.121.2024.02.12.07.21.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 07:21:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-61885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61885-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 185D61F22E6B for ; Mon, 12 Feb 2024 15:21:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6A0E3C48F; Mon, 12 Feb 2024 15:20:54 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AD1D18646; Mon, 12 Feb 2024 15:20:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707751254; cv=none; b=B8CtDdyuECk4hyXmSZxIWprMJCYH3jkLtwX0CyA5nwRyfwhIGKG2iCC87zAVSpeqxGn+D6cOo4QP9dDNKoWAcLFr0sCgXwr/8HpGVo9D/J5Zs9VhIXHDWW63wSKvVO34sH0Ixil770bVQkv1SOscEFcqmAE91skU8MT7lf7rFNc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707751254; c=relaxed/simple; bh=H3+LbC5XIYoAA9iHnFehp3Nh02tJISjNEtJOWVWd74Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FKsQNPNCC9iHaMANr+PojeF7hWVpQNODwtz+RkNTbHQCnpw/lYXs5YV97HYjTQ4R1qLIb4pMGKRNWxlgPw8frCQ/4dZ3DCnG4qL1aQ78E+D5qlXzT83nNS9pdzTVC1hfBc76KYhUVsrV1PtwPbh1kJwyQhoX83p+kBPg2Yae7so= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9E2CC433F1; Mon, 12 Feb 2024 15:20:52 +0000 (UTC) Message-ID: <972536bc-bee2-4333-847d-50b7827b6000@xs4all.nl> Date: Mon, 12 Feb 2024 16:20:51 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] media: cx2341x: Check return value of cx2341x_api() Content-Language: en-US, nl To: Daniil Dulov Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org References: <20240211150644.3642-1-d.dulov@aladdin.ru> From: Hans Verkuil Autocrypt: addr=hverkuil@xs4all.nl; keydata= xsFNBFQ84W0BEAC7EF1iL4s3tY8cRTVkJT/297h0Hz0ypA+ByVM4CdU9sN6ua/YoFlr9k0K4 BFUlg7JzJoUuRbKxkYb8mmqOe722j7N3HO8+ofnio5cAP5W0WwDpM0kM84BeHU0aPSTsWiGR yw55SOK2JBSq7hueotWLfJLobMWhQii0Zd83hGT9SIt9uHaHjgwmtTH7MSTIiaY6N14nw2Ud C6Uykc1va0Wqqc2ov5ihgk/2k2SKa02ookQI3e79laOrbZl5BOXNKR9LguuOZdX4XYR3Zi6/ BsJ7pVCK9xkiVf8svlEl94IHb+sa1KrlgGv3fn5xgzDw8Z222TfFceDL/2EzUyTdWc4GaPMC E/c1B4UOle6ZHg02+I8tZicjzj5+yffv1lB5A1btG+AmoZrgf0X2O1B96fqgHx8w9PIpVERN YsmkfxvhfP3MO3oHh8UY1OLKdlKamMneCLk2up1Zlli347KMjHAVjBAiy8qOguKF9k7HOjif JCLYTkggrRiEiE1xg4tblBNj8WGyKH+u/hwwwBqCd/Px2HvhAsJQ7DwuuB3vBAp845BJ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7rB3wCzfYkAuCBqaF7Zgfw8xkad KEiQTexRbM1sc/I8ACpla3N26SfQwrfg6V7TIoweP0RwDrcf5PVvwSWsRQp2LxFCkwnCXOra gYmkrmv0duG1FStpY+IIQn1TOkuXrciTVfZY1cZD0aVxwlxXBnUNZZNslldvXFtndxR0SFat sflovhDxKyhFwXOP0Rv8H378/+14TaykknRBIKEc0+lcr+EMOSUR5eg4aURb8Gc3Uc7fgQ6q UssTXzHPyj1hAyDpfu8DzAwlh4kKFTodxSsKAjI45SLjadSc94/5Gy8645Y1KgBzBPTH7Q== In-Reply-To: <20240211150644.3642-1-d.dulov@aladdin.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/02/2024 16:06, Daniil Dulov wrote: > cx2341x_api() may return an error, so add a check. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: 45ad9f8b44b0 ("V4L/DVB (4202): allow selecting CX2341x port mode") > Signed-off-by: Daniil Dulov > --- > drivers/media/common/cx2341x.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/common/cx2341x.c b/drivers/media/common/cx2341x.c > index 1f67e021138f..fa888d7c3988 100644 > --- a/drivers/media/common/cx2341x.c > +++ b/drivers/media/common/cx2341x.c > @@ -1035,7 +1035,10 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func, > }; > int err; > > - cx2341x_api(priv, func, CX2341X_ENC_SET_OUTPUT_PORT, 2, new->port, 0); > + err = cx2341x_api(priv, func, CX2341X_ENC_SET_OUTPUT_PORT, 2, new->port, 0); > + > + if (err) > + return err; Indentation is all over the place, please fix! Regards, Hans > > if (!old || > CMP_FIELD(old, new, is_50hz)) {