Received: by 10.223.185.116 with SMTP id b49csp3248930wrg; Mon, 12 Feb 2018 23:25:02 -0800 (PST) X-Google-Smtp-Source: AH8x224zIf+oN0pUJR8VY6YS6X0+VBByIPdPZcc0eR0jSVUYWdWzvcYKWHXKMFOWs5ZefKnsSDj6 X-Received: by 2002:a17:902:2bc5:: with SMTP id l63-v6mr282340plb.108.1518506702741; Mon, 12 Feb 2018 23:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518506702; cv=none; d=google.com; s=arc-20160816; b=SlGAk8aX5qy5jK8w/VtqjugowPXIbh9D+IgKfXPGJNzgc2utvzR40fj5KqYcn3pyFB dyj1PM2+9dt3CLDurRrlGVLHMnOVVhIaqmRHCsxFQy76J9z45BI75WBUzr4+AuxPZlBv t+9Dd8+I6YOUZnz3BQNvQUB16R3cgUCSvpU1pgZcVR1M4/gYFgtNL8fEN7dukmPIUvkm 8ztHBycMgpsbYRYcWb2tTrt+db1XhIiuIKuNsQJ1T3WmezqLGXP3Mz1f/qifsH3gkT6w N9l6bMMIrfic+vszpQTcjlrKSz7L7Ca2ooiEXjr2DaqPp9e47jI2QNcwRF9Ic01s46bw Kzgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=vrbatPaoYQh6Z8iKvcebNyaQ9BKyaC18LzHMSLCY+js=; b=rzfjE6auz23CUlTITkEGMNKWqfZ5LXYlMn7i/+cISBfxjSpNlkVRYJoGVjr+tho2Wb e3KXT96paiD4mOWPRTQ+d3YNuFXFDVFyOMyOq2vgvvb0o4KRtt2sByKM+EloYDKUvlEA B6wmphbvOcGVEZE2isYuEBuM+Ge4dcJoRQa5gJa9UqugoV4ct0gIlEL9I4ISLHqVXOv1 EaYYDkAjTSVwb8wuR4B6Bo/hp8l7e+4UlniRyPetoNRyggyWVuoIMrCUDn9gEfiyK00p Do5KUS3sOvWQ+vOKWq3mHsDuTHkcC8jNkAWVM/IOCBYSvSMXgxycJZipNm8goO4Pgz1w s+QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=OZjQVXgo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17si796263pgo.189.2018.02.12.23.24.48; Mon, 12 Feb 2018 23:25:02 -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 header.i=@oracle.com header.s=corp-2017-10-26 header.b=OZjQVXgo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933561AbeBMHXy (ORCPT + 99 others); Tue, 13 Feb 2018 02:23:54 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:36276 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933426AbeBMHXw (ORCPT ); Tue, 13 Feb 2018 02:23:52 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1D7LXn2121984; Tue, 13 Feb 2018 07:23:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=vrbatPaoYQh6Z8iKvcebNyaQ9BKyaC18LzHMSLCY+js=; b=OZjQVXgoYkkp65wAUHb7tsL0HJekTqMnlD2zJUyUI+JIoCK5LPU0Il9fBBWJH+UZNw8P WZbSodwJl1N9f+eQjH44hlhorZMWdrOPwpb3KiZhtadMvkVm23UxZnTQ6fUEvmuOk1Lb MpXqZyagU3nZZ05XTvrBpzX4/cBRTqsjed/FFWxB5m6Bm5xZavt3Vrv1TI03k5iAZCtA in6NMhOVQWDfAc1ujx0yWsO+X9cQF6cSKxKmZImIxPpDKXqbrUTlZ6If5ApqxSNi8eI5 BDd7HA6xqzPdPJehBWnomAU6mlnqKQBA7H4Wc5Rd2STyGnYk7QFQ66hbp/I0cqH85oe2 hw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2g3ta4g8w0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Feb 2018 07:23:20 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w1D7NHTR023765 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 Feb 2018 07:23:18 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w1D7NESJ017462; Tue, 13 Feb 2018 07:23:14 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 12 Feb 2018 23:23:13 -0800 Date: Tue, 13 Feb 2018 10:23:02 +0300 From: Dan Carpenter To: Kieran Bingham 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 Subject: Re: [PATCH v2 5/5] drm: adv7511: Add support for i2c_new_secondary_device Message-ID: <20180213072302.wlrqf5zgr7q26rsr@mwanda> References: <1518459117-16733-1-git-send-email-kbingham@kernel.org> <1518459117-16733-6-git-send-email-kbingham@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1518459117-16733-6-git-send-email-kbingham@kernel.org> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8803 signatures=668668 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=903 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802130092 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > @@ -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