From patchwork Mon Jul 22 17:26:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 11053133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90570912 for ; Mon, 22 Jul 2019 17:26:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 771DE28421 for ; Mon, 22 Jul 2019 17:26:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6836C286F1; Mon, 22 Jul 2019 17:26:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1A02628421 for ; Mon, 22 Jul 2019 17:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Anw1AD1d0WGPy/Tl/N259gwQyc6JLrJoDgPVXLg7Ck0=; b=lO37GAf/dgzF49 njcaqI5NdkGH6JGu0BRDW7oOX9jYSbrHSOyHkJqCU88UUBFHiDIq18ayjkiaODzAQ/kV/VxB198dP f6sL5+akIP6KtVGlUEcjMw1qBelGbM22emw1egewwVLBZk+3euqcz0isqINYHZc/g6Kw0ueUsDt++ XlDXCBQUsqAnFuVVwpToUFtVh1a5SnhPTIpfC+t7LOKqgfCvl029/OFGF621iSkPLvJOBbeFElv05 SweV/jzDQqo04LKAhYTROx+G6a78d4URtEh1HIr0hSd6mFaCCT+hoFsdQakTzBbTsvE6xNMT7DZHp dn93nqb1JJut3H85zGSQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hpc52-0002zg-Su; Mon, 22 Jul 2019 17:26:32 +0000 Received: from sauhun.de ([88.99.104.3] helo=pokefinder.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hpc4z-0002yM-Cu for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2019 17:26:31 +0000 Received: from localhost (p54B33E22.dip0.t-ipconnect.de [84.179.62.34]) by pokefinder.org (Postfix) with ESMTPSA id C43EE4A149D; Mon, 22 Jul 2019 19:26:25 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Subject: [PATCH 03/14] mfd: ab3100-core: convert to i2c_new_dummy_device Date: Mon, 22 Jul 2019 19:26:10 +0200 Message-Id: <20190722172623.4166-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190722172623.4166-1-wsa+renesas@sang-engineering.com> References: <20190722172623.4166-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190722_102629_582210_305CFB8D X-CRM114-Status: GOOD ( 10.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wolfram Sang , Linus Walleij , Lee Jones , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an ERRPTR which we use in error handling. Signed-off-by: Wolfram Sang Reviewed-by: Linus Walleij --- Generated with coccinelle. Build tested by me and buildbot. Not tested on HW. drivers/mfd/ab3100-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c index e350ab64238e..7e007df857b8 100644 --- a/drivers/mfd/ab3100-core.c +++ b/drivers/mfd/ab3100-core.c @@ -896,10 +896,10 @@ static int ab3100_probe(struct i2c_client *client, &ab3100->chip_name[0]); /* Attach a second dummy i2c_client to the test register address */ - ab3100->testreg_client = i2c_new_dummy(client->adapter, + ab3100->testreg_client = i2c_new_dummy_device(client->adapter, client->addr + 1); - if (!ab3100->testreg_client) { - err = -ENOMEM; + if (IS_ERR(ab3100->testreg_client)) { + err = PTR_ERR(ab3100->testreg_client); goto exit_no_testreg_client; }