Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4607097pxj; Wed, 12 May 2021 09:08:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdiXn++KE1RzNqxfAUb2KWFzXxTJ857ogGQcp6F7E3y9ZUoZm4j5duIs+dUwV8nqNUNqqN X-Received: by 2002:a9d:6e09:: with SMTP id e9mr25228534otr.126.1620835694685; Wed, 12 May 2021 09:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620835694; cv=none; d=google.com; s=arc-20160816; b=Q7RlImEnAodx327g8GOJIVBJeHS3TtvPL/miBVkr+FgCXLZUA352vuGbztRVwtI41R FluApySJLoISP4MbDQWTH7Yq8ouEt5uDedZvtd8fIKGoyAtpanz35ink4/Jc6YLJN0us 3/nGqnNtnt7uBEG+VTFnZ+kmhyJLlukA077ZtGE2JHXgy3e2duznzQ2ABl49wfn8PQAq UZFSosOLgBIqZAuMHWwLRKNY4pOVOPaBVwSgaMOZ4Nm95OcO6J5ehO1QNJiCFYLWLzC1 J2NB/OaTLGm0c7dhj9wvmTAIjtzlJ82i3noHWr8ccUfzkGSRBTHVIASSYy/PpqUEVr2N opsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iRyR+LhIjuoHF+1OSWFzwXrlfTTNqP3L1MZSA2KdJzU=; b=Je2zjBhHlpLtH2caJLyR1Sy27Uam/bKWE/LuS9FpEg6J474Rc321ginWQonR4BSp7X m6gIJLRToqPQRTbrtrmwuWQWgNC16F8YX4GXZYFdVCx2gy3SNRakLt+xMzMovuCEu9RJ eALISwVOE4HnG159sC2MAJ+WXEdb82CXzrHVXFh5kQmBZFExdj7s/NVXL99lUPSozcfu tQVO5/wqt8o/hPvIVchnVOIlNogiRTFTl0pBdAmqRIreFo3lzhyjQMdfupIMXaoUP7G+ Bfjj3V7kPEmAdfN/RezeR8deP8GV8L5rYoGxZM3m7laylrrcTttmTmcVAe3soRgoRIYo xOZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="kI1kXa/h"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q7si186987otn.319.2021.05.12.09.08.01; Wed, 12 May 2021 09:08:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="kI1kXa/h"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239145AbhELQH1 (ORCPT + 99 others); Wed, 12 May 2021 12:07:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:40914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235682AbhELP2q (ORCPT ); Wed, 12 May 2021 11:28:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1683C61C31; Wed, 12 May 2021 15:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832488; bh=Yuzkcg7FSzfKl8w00MFhYFKtW9QDj/lHSoQ7K/RzPgs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kI1kXa/hFYvf+E1cvkNy7iO7MlREKPfPvtybunL3kDOdqAjDQE/vdMtNjaUcTX/cZ w5jttrWBn9v3yl8uu2q6fdpT1Ug6LoY0Y+iDxilaegf8UTuel1obUqOAqSliivPrRa Xg633A1TQtNmMxHZEJZdgbMqnFt4NqAvP7NTenL8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wei Yongjun , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.10 293/530] media: m88ds3103: fix return value check in m88ds3103_probe() Date: Wed, 12 May 2021 16:46:43 +0200 Message-Id: <20210512144829.437861477@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun [ Upstream commit e61f9ea271933d987ab895c689fa37744f6fc27f ] In case of error, the function i2c_new_dummy_device() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: e6089feca460 ("media: m88ds3103: Add support for ds3103b demod") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/dvb-frontends/m88ds3103.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c index ad6d9d564a87..c120cffb52ad 100644 --- a/drivers/media/dvb-frontends/m88ds3103.c +++ b/drivers/media/dvb-frontends/m88ds3103.c @@ -1904,8 +1904,8 @@ static int m88ds3103_probe(struct i2c_client *client, dev->dt_client = i2c_new_dummy_device(client->adapter, dev->dt_addr); - if (!dev->dt_client) { - ret = -ENODEV; + if (IS_ERR(dev->dt_client)) { + ret = PTR_ERR(dev->dt_client); goto err_kfree; } } -- 2.30.2