Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp17168rdb; Fri, 18 Aug 2023 12:43:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4eatIGjYuE7fCyGUTzipZGm7ZU/DZ4zWV2Leb/7DkmyfTBP1rUcF8WNg+hNunup04/uwJ X-Received: by 2002:a05:6a00:1994:b0:688:49e6:d113 with SMTP id d20-20020a056a00199400b0068849e6d113mr168874pfl.34.1692387834815; Fri, 18 Aug 2023 12:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692387834; cv=none; d=google.com; s=arc-20160816; b=C4pDld/0z4ZA0QxBE6EIBxTwJVCgxT1QWpkWmNY52ejT8k3371m35LEMBS9h9a+Z+c TvUwrQlkX4vn920zyZIs4/oSPnWBWZGLpf74ufSPAbVJeup6UOmbCTje+lMDtaokk8pt Dz+XkIK5S0m/XYhcKD+Q27nyU3WJe2HTTCehxhl9KRRUIauv+3T5IVPtSCXhJFmaQGc6 bmo0t5b1qI/MIzCCkUJqeHFc9nfypCq3jb69Wdw1BHdpY9Iix4EvX9Dc1C1AbtRqXX2e 4aiUvxDtycEBHeMUALvnP1essVE2k8w28S9I/rrX8OiF3e2W/P3MJJKFrChXLXvnJDVS pugQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=dByNV2DEb6vsWtk1sV/oK+AWgY2TmQWup9DnDORVbX8=; fh=1C7FtWsN50c+d5fSA3jZHQjbmupJUW2Z5CvwoQ1Kga4=; b=xV+DML8GpWxxwKF3tXcQnqweTybvzVjf0LV7ymbuyc6hIIcmgtH2UoAt5u10frK72F XWbr0Zxd3YQw/Rp85RBwHNkI8c5tDgFiDMEVK7LH3xizkaowTeCCJPeXFNSZvVU7p8GO NqXGXWbDJfdxOv4edKUumgwlxeE/iM2apiEOeGaqA6Zwk4UKrLFK1hc7E9mkv2WTzCxt C5mCe3asK2nUpicuHUYZm8fXiPBfTaL0YVbrWUTZDboRRDQHVENSm+vCa31Y2QQ+srCE btBh8bDE14N5uVitsVsWcY5v8Euz054Fbbur6tO9d7WxoQjH8xFhBi4Y43fOaJ4LKdBQ Ji7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cb12-20020a056a00430c00b00689f381d7easi1947914pfb.242.2023.08.18.12.43.42; Fri, 18 Aug 2023 12:43:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377501AbjHROdE (ORCPT + 99 others); Fri, 18 Aug 2023 10:33:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377796AbjHROc5 (ORCPT ); Fri, 18 Aug 2023 10:32:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F27F53C3D; Fri, 18 Aug 2023 07:32:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8828165E3D; Fri, 18 Aug 2023 14:32:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3534C433C9; Fri, 18 Aug 2023 14:32:46 +0000 (UTC) Message-ID: <1c00196c-e64e-119a-fd30-5e8f797c22ec@xs4all.nl> Date: Fri, 18 Aug 2023 16:32:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] [media] mxl111sf: Check return value in mxl111sf_config_mpeg_in To: Artem Chernyshev , Michael Ira Krufky Cc: Mauro Carvalho Chehab , linux-media , LKML , lvc-project@linuxtesting.org References: <20221222214607.39737-1-artem.chernyshev@red-soft.ru> Content-Language: en-US, nl From: Hans Verkuil In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/12/2022 17:28, Artem Chernyshev wrote: > Hi, > On Fri, Dec 23, 2022 at 07:28:47AM -0500, Michael Ira Krufky wrote: >> On Thu, Dec 22, 2022, 4:46 PM Artem Chernyshev >> wrote: >> >>> Error check after mxl111sf_read_reg >>> >>> Found by Linux Verification Center (linuxtesting.org) with SVACE. >>> >>> Fixes: 4c66c9205c07 ("[media] dvb-usb: add ATSC support for the Hauppauge >>> WinTV-Aero-M") >>> Signed-off-by: Artem Chernyshev >>> --- >>> drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c >>> b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c >>> index 40b26712ba4c..ad1888514bd0 100644 >>> --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c >>> +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c >>> @@ -121,7 +121,8 @@ int mxl111sf_config_mpeg_in(struct mxl111sf_state >>> *state, >>> mxl_fail(ret); >>> >>> /* Configure MPEG Clock phase */ >>> - mxl111sf_read_reg(state, V6_MPEG_IN_CLK_INV_REG, &mode); >>> + ret = mxl111sf_read_reg(state, V6_MPEG_IN_CLK_INV_REG, &mode); >>> + mxl_fail(ret); >>> >>> if (clock_phase == TSIF_NORMAL) >>> mode &= ~V6_INVERTED_CLK_PHASE; >>> -- >>> 2.30.3 >>> >> >> Artem, >> >> Thank you for this. If I recall correctly, the read from that particular >> register often returns a failure despite the correct value being read into >> memory. This needs to be tested before being merged, and if my memory is >> correct about this we should add a comment about it. Unfortunately, I'm out >> of town at the moment, I won't be able to test this for some time. Can we >> hold off on this one for a bit? If you don't hear from me after a few >> weeks, please feel free to ping me again. Thanks. >> >> Best, >> Michael Krufky >> >>> > > Thanks for reply. I'll be waiting for your decision I'll drop this patch, I never saw a follow-up on this. If this is really needed, then just resend. Regards, Hans > > Best regards, > Artem