Received: by 10.223.185.116 with SMTP id b49csp3616776wrg; Tue, 13 Feb 2018 05:11:50 -0800 (PST) X-Google-Smtp-Source: AH8x224lBS1jtTmEqINnY2guyT/SpScKoAM1Ks2aRRVXvoH6/9Trh75CkKTLawbNtd4rv/Xpze1b X-Received: by 2002:a17:902:7886:: with SMTP id q6-v6mr1113025pll.364.1518527510442; Tue, 13 Feb 2018 05:11:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518527510; cv=none; d=google.com; s=arc-20160816; b=AtT9hqdfo99+0w2JgiApTV3NLiK0JuRtXrcKtM5YrhctHxISyzvSdWaVt6AkO/kFsQ zpdkoiVprFj6BBfm9g1TU2GfdzntDEvhQW3xAprGfBNqZ9/RVgXj/tc3g3cB8blkqilV j3igcBlKucg8Bs/7438QzYGnB/n6dw6olB9NTm3PZY/oR3LqQRjW24+7OwIAS4olEDTf Zm5x/GEgx+HeNEHVvc71Z59zBPOuJkBkxc+nvnQhQAdRhkooIwRKEPMmV2lAeH2iNsn/ 8qFw/B6oqGzVYzjAe9CERwWfLtgEYqtnwtQYWcBTV/e2zqsjX3YxoK2QFB2q5UFelhVy B0Sw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=tQhgRmTLt1vkYqdLO9yA9Fz+BL6gy4TTULNKVciadQ0=; b=iI0lxAeWuSxe+e1dL6e5/FP3UA+U4Rz9eFILzW0hieeIF720dRllsG0fUv2g1J/uxS 8BdxrAsROiPp3RxYjhKMDQ7+u3zqvvg1Y6P31mdtPjO+bctD6b18tsaRc9uAN1hD6xBM hmOEJ9s4mTgyCJkL03gzUXJ8yk8+4CINDju4nxFP9ix0TCyMZZb2HCsK9ZZVbez7YpwA C9gA0ROsP3fhNgn4AHpMRLcT7nFxMM3Bt1EQIoz4cbRcFB064w+GL+vmVOfpouryBOr6 TYOUeMaELF0jadPxNvgAE36wqlLxrf3CiOleKSiQIYt7gTqcqI7pwLBk9voyjbWkoZXH 9D6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=WqnMoOHU; 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 m73si1559315pfj.131.2018.02.13.05.11.35; Tue, 13 Feb 2018 05:11:50 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=WqnMoOHU; 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 S964824AbeBMNJ3 (ORCPT + 99 others); Tue, 13 Feb 2018 08:09:29 -0500 Received: from galahad.ideasonboard.com ([185.26.127.97]:42354 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935117AbeBMNJ1 (ORCPT ); Tue, 13 Feb 2018 08:09:27 -0500 Received: from [192.168.0.20] (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 25DAD2005E; Tue, 13 Feb 2018 14:07:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1518527275; bh=xDIaL9v+SOE4lVCB0hGnZIVyQIoA0a1qTf4hrJmAe/I=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=WqnMoOHUdpReNUWWPwzN0hktbRXnlNisdD1aNJ1M3Z2ZTm5zvyngC+P08nQDipj5q u+hRO2TRvUOzy2VmWB7MnKd++xOR9c78VC6Dv5K3D4YwuJYpMO4r18kUi0bV/YXS8f TL4Hjnvee9xAC9g8yywQqBrA5yAAT8norBeBhrO0= Subject: Re: [PATCH v2 5/5] drm: adv7511: Add support for i2c_new_secondary_device To: Dan Carpenter Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Kieran Bingham , Jean-Michel Hautbois , Sergei Shtylyov , Kieran Bingham , Archit Taneja , Andrzej Hajda , Laurent Pinchart , David Airlie , Hans Verkuil , Lars-Peter Clausen , Daniel Vetter , Bhumika Goyal , Inki Dae References: <1518459117-16733-1-git-send-email-kbingham@kernel.org> <1518459117-16733-6-git-send-email-kbingham@kernel.org> <20180213072302.wlrqf5zgr7q26rsr@mwanda> From: Kieran Bingham Organization: Ideas on Board Message-ID: <320a656e-23eb-7aaa-bb8a-b7e542e60c9e@ideasonboard.com> Date: Tue, 13 Feb 2018 13:09:22 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180213072302.wlrqf5zgr7q26rsr@mwanda> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dan Thank you for the review, On 13/02/18 07:23, Dan Carpenter wrote: > On Mon, Feb 12, 2018 at 06:11:57PM +0000, Kieran Bingham wrote: >> + adv7511->i2c_packet = i2c_new_secondary_device(i2c, "packet", >> + ADV7511_PACKET_I2C_ADDR_DEFAULT); >> + if (!adv7511->i2c_packet) { >> + ret = -EINVAL; >> + goto err_unregister_cec; >> + } >> + >> + regmap_write(adv7511->regmap, ADV7511_REG_PACKET_I2C_ADDR, >> + adv7511->i2c_packet->addr << 1); >> + >> INIT_WORK(&adv7511->hpd_work, adv7511_hpd_work); >> >> if (i2c->irq) { >> @@ -1181,7 +1190,7 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id) >> IRQF_ONESHOT, dev_name(dev), >> adv7511); >> if (ret) >> - goto err_unregister_cec; >> + goto err_unregister_packet; >> } >> >> adv7511_power_off(adv7511); > > There is another goto which needs to be updated if adv7511_cec_init() > fails. Aha - thanks - I'll look into this now. > >> @@ -1203,6 +1212,8 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id) >> adv7511_audio_init(dev, adv7511); >> return 0; >> >> +err_unregister_packet: >> + i2c_unregister_device(adv7511->i2c_packet); >> err_unregister_cec: >> i2c_unregister_device(adv7511->i2c_cec); >> if (adv7511->cec_clk) > > > regards, > dan carpenter >