Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp73863ybx; Wed, 6 Nov 2019 13:26:42 -0800 (PST) X-Google-Smtp-Source: APXvYqx16V5akEIGtuh/0LLpPTa89KIm+274blF3WwoWL21HNcB2A+9yDGKDja5plO8zGENotPe/ X-Received: by 2002:a17:906:49cd:: with SMTP id w13mr34764804ejv.311.1573075602630; Wed, 06 Nov 2019 13:26:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573075602; cv=none; d=google.com; s=arc-20160816; b=szUXb7EE8I+68fAMX1CYNNWoUvvO47nzrSsBqbEKSFZRK3McR9VuWKdsBQaTGZhJBn 3ucQN4T8WwC91WS6AYqRojdAJ04Wj4aMf4/xlFab4hRhoGBQ7sKOrg1b5nE3+Q4fzU86 2RR4gsMNzshlXkIBi+YZic/JQazNx079IEB5JudGdnlNlMVwIJakrEiKoQdnUFZ5Q/Jw uIHkYWGVRrEOLT3q5oNStSGLaRno/SFhckKy3RGGIEPX4ooIZEUTKUj9g56/0vNq9OgE vsq+874bkNUgVHC2eQe2/Wr5ui6mZmZqBj3XaWRHiRZ3dubFtYjf5r+8pMcYcH+diJJC npew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ren90NbHVDROYWG/CVMk2yuE28kgKikTlFdCiJgFch4=; b=Ov1VXdLK5Zqh1JDEdc0LmiR7H43ijzHEZhNKswsgyVVWaoA2w+KAMidYuWuxiawRQV UDVkwgUPBlb14E2UOZyueJ5do3kMRJkdABJ38EXdBGvbVZPfqgYG6MRupkPbaLI6FQAk nDVveyIWCF7CfBOBjsx00UQ9Gt518oASX/JP8SWzAUCCv0WjKppnJidMsxO/sb4nVPhh OaMXAWjGRmgr2SGggjgYy/o/wa4HXVBrbxk/zWVaxqhAH5TE76DqG6lGdU1j0E74RfXJ Pz06b7mbeaFw50JD4atR+diGJEp/2erewo/b1Trf4WFI1ug7cCQyKl+pljU2RFLSW0ev DaCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ca10si12243635edb.67.2019.11.06.13.26.19; Wed, 06 Nov 2019 13:26:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732472AbfKFVVY (ORCPT + 99 others); Wed, 6 Nov 2019 16:21:24 -0500 Received: from sauhun.de ([88.99.104.3]:58986 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727973AbfKFVVX (ORCPT ); Wed, 6 Nov 2019 16:21:23 -0500 Received: from localhost (p54B33505.dip0.t-ipconnect.de [84.179.53.5]) by pokefinder.org (Postfix) with ESMTPSA id 90CEF2C054E; Wed, 6 Nov 2019 22:21:21 +0100 (CET) From: Wolfram Sang To: linux-media@vger.kernel.org Cc: linux-i2c@vger.kernel.org, Wolfram Sang , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Subject: [PATCH 02/17] media: dvb-core: dvbdev: convert to use i2c_new_client_device() Date: Wed, 6 Nov 2019 22:21:02 +0100 Message-Id: <20191106212120.27983-3-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191106212120.27983-1-wsa+renesas@sang-engineering.com> References: <20191106212120.27983-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang --- drivers/media/dvb-core/dvbdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index 917fe034af37..80b6a71aa33e 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c @@ -983,8 +983,8 @@ struct i2c_client *dvb_module_probe(const char *module_name, board_info->addr = addr; board_info->platform_data = platform_data; request_module(module_name); - client = i2c_new_device(adap, board_info); - if (client == NULL || client->dev.driver == NULL) { + client = i2c_new_client_device(adap, board_info); + if (!i2c_client_has_driver(client)) { kfree(board_info); return NULL; } -- 2.20.1