From patchwork Wed Oct 26 14:57:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoine Tenart X-Patchwork-Id: 9397429 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6F90360236 for ; Wed, 26 Oct 2016 15:01:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50047285F3 for ; Wed, 26 Oct 2016 15:01:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43E6929BA2; Wed, 26 Oct 2016 15:01:56 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 69B97285F3 for ; Wed, 26 Oct 2016 15:01:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bzPga-0006PF-R9; Wed, 26 Oct 2016 15:00:12 +0000 Received: from up.free-electrons.com ([163.172.77.33] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bzPfG-0005Bl-EM for linux-arm-kernel@lists.infradead.org; Wed, 26 Oct 2016 14:58:52 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id A80CA20C64; Wed, 26 Oct 2016 16:58:01 +0200 (CEST) Received: from localhost (unknown [163.172.35.26]) by mail.free-electrons.com (Postfix) with ESMTPSA id 7ED4920790; Wed, 26 Oct 2016 16:58:01 +0200 (CEST) From: Antoine Tenart To: maxime.ripard@free-electrons.com, pantelis.antoniou@konsulko.com, mark.rutland@arm.com, sboyd@codeaurora.org Subject: [RFC PATCH 3/5] w1: report errors returned by w1_family_notify Date: Wed, 26 Oct 2016 16:57:54 +0200 Message-Id: <20161026145756.21689-4-antoine.tenart@free-electrons.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161026145756.21689-1-antoine.tenart@free-electrons.com> References: <20161026145756.21689-1-antoine.tenart@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161026_075850_821087_B4320669 X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.petazzoni@free-electrons.com, devicetree@vger.kernel.org, Antoine Tenart , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 Signed-off-by: Antoine Tenart --- drivers/w1/w1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index bb34362e930a..80d0cc4e6e7f 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -702,7 +702,9 @@ static int __w1_attach_slave_device(struct w1_slave *sl) dev_name(&sl->dev), err); return err; } - w1_family_notify(BUS_NOTIFY_ADD_DEVICE, sl); + err = w1_family_notify(BUS_NOTIFY_ADD_DEVICE, sl); + if (err) + return err; dev_set_uevent_suppress(&sl->dev, false); kobject_uevent(&sl->dev.kobj, KOBJ_ADD);