Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5484773imu; Mon, 26 Nov 2018 00:47:53 -0800 (PST) X-Google-Smtp-Source: AFSGD/W5BDRfT0kKqYRGPGz3xqD5gfmS4UwCOlBWmPcMuA3HVTjx7d0Z91Xz5mREhRCXBpUyFsJb X-Received: by 2002:a17:902:bf49:: with SMTP id u9mr26391928pls.4.1543222073009; Mon, 26 Nov 2018 00:47:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543222072; cv=none; d=google.com; s=arc-20160816; b=VktuRuCBWv1g5eahag3nxsNTeAIcd376bY1eux16NtBqd2n956PfxETIJhCdrufE7Z fmz5RxLcm8gsgLSU477s2AJPyj8pAlFhue11C4EqldLzCNsk3fpJC3kaCSdnf2SR21yp E+1n1QqeLTfOotNt0BRdb3iZpTEZ6si15RrHQ30HyOjKbMSRiSKefar2SNgsnxzlybgs Kzs1u1bc8fxiMl/XorYEEeSR6baaI8XcxWYESqBvq7SBL+1jsF750amcfnSvaKDO73em BUudRYG8edOgsh08mlQXGZfbXIxEPFx3CS0Ogy8Dt1EBzlxqb9pyAg2QAliEz4fr3m3L ORag== 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:subject:cc:to:from:date; bh=YDVBLTDZ1T/ySmzm9xgNCCiTpOVHuWlGYbO5jIMKnD8=; b=u+Ht92ushrjwXEOL3/Qy1KtjWKbP+cPc/i6j0Tx8EyAXYgESnN1gPzGv3zaWuhhr01 Fm857cfMLJwaVfZ9oyrSqYPKOPc0lt1R8mDpqzP09PlPZA6rm53B1mpCtYsziY5Q6KlG pVI6+wCsiZ7XyqqCLyOjnwoVuHrNdBFCTsB/PiqK4ErJ1wXhRETdgtihV0UmQDHZu5SM tarOhKHIQrd0IUaHRzeAtTMwRbZlkApf1rAAJnrt1FSwSQJOJPAbH0ekxH93pVoKn+uF +dN9Vy2oU5eQJfg27PO/+4SjP4pfQy4DzLdEDGNUfk42Kj3ZDoMub/FkQOscF9bsvvpN 5hEQ== 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 h5si29051378pgg.230.2018.11.26.00.47.38; Mon, 26 Nov 2018 00:47:52 -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 S1726311AbeKZTkL (ORCPT + 99 others); Mon, 26 Nov 2018 14:40:11 -0500 Received: from mail.bootlin.com ([62.4.15.54]:44567 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726158AbeKZTkK (ORCPT ); Mon, 26 Nov 2018 14:40:10 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id D8E17207BF; Mon, 26 Nov 2018 09:46:44 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id AE3C62074D; Mon, 26 Nov 2018 09:46:34 +0100 (CET) Date: Mon, 26 Nov 2018 09:46:34 +0100 From: Boris Brezillon To: Dan Carpenter Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 1/2] i3c: fix an error code in i3c_master_add_i3c_dev_locked() Message-ID: <20181126094634.6166a238@bbrezillon> In-Reply-To: <20181123071324.iwmbay2yrbiocisf@kili.mountain> References: <20181123071324.iwmbay2yrbiocisf@kili.mountain> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 23 Nov 2018 10:14:42 +0300 Dan Carpenter wrote: > We should return "ret" as-is. The "newdev" variable is a valid pointer. > > Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure") > Signed-off-by: Dan Carpenter Queued to i3c/next. Thanks, Boris > --- > drivers/i3c/master.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c > index 0ea7bb045fad..bda4b9613e53 100644 > --- a/drivers/i3c/master.c > +++ b/drivers/i3c/master.c > @@ -1823,10 +1823,8 @@ int i3c_master_add_i3c_dev_locked(struct i3c_master_controller *master, > return PTR_ERR(newdev); > > ret = i3c_master_attach_i3c_dev(master, newdev); > - if (ret) { > - ret = PTR_ERR(newdev); > + if (ret) > goto err_free_dev; > - } > > ret = i3c_master_retrieve_dev_info(newdev); > if (ret)