Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp502420ybl; Tue, 7 Jan 2020 09:50:25 -0800 (PST) X-Google-Smtp-Source: APXvYqxT/g6yq8c3hd8qbXV/pQtNH0P4nsQP81ZxqC1sRBORaXawWEp2VKh1cU7oPkncoFbDDgLi X-Received: by 2002:a05:6830:1e09:: with SMTP id s9mr978948otr.139.1578419425090; Tue, 07 Jan 2020 09:50:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578419425; cv=none; d=google.com; s=arc-20160816; b=we00L2YtuBv8AgypwTnaIHXI9WgSJFca1ZVtUZexa1N4XPXuQKOn4hycEXl96C4GHx 1gDV+hncVsALJjTYtgLWL2EqqdGUK3+Dx1u5gZs94/RGtGzlkKfP7Xpjawv4DGHa0ulS ULdebrd3TftA4d8Xhe5O9gL76WQWov57IAEp9grueQD892U22dkqiGazioThR65qdc4q vygDmfdM05FNjEUBGffPfsinJGm4rmuBPq/JNSjP1og6C81JINm/G3vv4QLCXxTKCl9C RBp1SMZQQte5ePxeQ6M3AHRF7KGsBxCV/bK3DzPKPDmoumL2dW/nSddjC31ZWBt/bX/u AWSQ== 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=81Jw8P03jpIVE/THlpIvsfyu9D72GaaH2mKkiIeSJSk=; b=vIItMbJb8chcK4o+9n1fMb7SNcIdVkF60Mxx/+DDbPVqWYWiY9ZN+qESq9TOpojXV3 n4gpV9JrW3rpPNTBWQ4gCyQLz+DerKnuh+NgZo1wioauTnSLmpXOIZvOwqzxP4ncApSU 5aok+k+VLelv4p5WUE8t7wgK94F2i1DfsUHx24VwhgsCzlNo6bD8P738jzUwuvXyLdSs CePWvgvqIGjDiVQaQJ0dVbvuOHTHiACaKkgqM5pfmwjD3ni0e4VuaAGirdUe9hHn5X7w LeUrX1vcVFvJQDv/sR9RLtlggHtpi2epfYZvyRmMV01xnUFrHdOM4nYxmBHul0nunFjR 5hPw== 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 d20si357430oic.40.2020.01.07.09.50.11; Tue, 07 Jan 2020 09:50:25 -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 S1728521AbgAGRsS (ORCPT + 99 others); Tue, 7 Jan 2020 12:48:18 -0500 Received: from sauhun.de ([88.99.104.3]:53318 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728211AbgAGRsR (ORCPT ); Tue, 7 Jan 2020 12:48:17 -0500 Received: from localhost (p5486CF8B.dip0.t-ipconnect.de [84.134.207.139]) by pokefinder.org (Postfix) with ESMTPSA id DB5982C05BA; Tue, 7 Jan 2020 18:48:15 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Hans de Goede , linux-kernel@vger.kernel.org Subject: [PATCH 01/12] i2c: cht-wc: convert to use i2c_new_client_device() Date: Tue, 7 Jan 2020 18:47:35 +0100 Message-Id: <20200107174748.9616-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200107174748.9616-1-wsa+renesas@sang-engineering.com> References: <20200107174748.9616-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 Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang --- Build tested only. drivers/i2c/busses/i2c-cht-wc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c index b8fde61bb5d8..35e55feda763 100644 --- a/drivers/i2c/busses/i2c-cht-wc.c +++ b/drivers/i2c/busses/i2c-cht-wc.c @@ -388,9 +388,9 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev) */ if (acpi_dev_present("INT33FE", NULL, -1)) { board_info.irq = adap->client_irq; - adap->client = i2c_new_device(&adap->adapter, &board_info); - if (!adap->client) { - ret = -ENOMEM; + adap->client = i2c_new_client_device(&adap->adapter, &board_info); + if (IS_ERR(adap->client)) { + ret = PTR_ERR(adap->client); goto del_adapter; } } -- 2.20.1