Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9713461pxu; Tue, 29 Dec 2020 03:04:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLXyQo4dcJUJHTU67QMf+OZh5W0ZDMCiiCDatN4SK90nQqDSbX87At4mZd9ZUb+UIkhn3j X-Received: by 2002:a17:906:ca47:: with SMTP id jx7mr46864267ejb.237.1609239848717; Tue, 29 Dec 2020 03:04:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609239848; cv=none; d=google.com; s=arc-20160816; b=WnUKly15acqTRNbxkejalvXiO/MWiBvl+kEK9gmzlhMJQTXIwKYO6moU3qop1BB7Nu v5QgnMWIVOtW03yA3wAbNBka9vTQ6B2Sa8P4Y8MEvMzKIf4ko99TYg44eIaUy0dJ+Dv2 b42YrqcPYAGA8VrW1Z0hH2hE+pZxbFSBy2O/132z6fcIWkK/2bpl5nzgMG6LD6Q43t5c UQ45t0tuJn+kmyku1qoKciMpKqPQFGxH4TmoEScYXHHJXE7MQyF5rGP+vVYGOtoeZZxE cwQLVULuS9Gryhi2id2y/aKLNaQMmAy7uFawjAVdLG0KYr2x/czfRue1PyQMVyMRV9xT 1LyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=+tQiRgFVs1ecSRTznh8zWZJajSaxb1w3A0hIkVSyae4=; b=JjPuvieBEA39Cw+dlriDBXaupoL7CLoc67xp9G9gZDEnqkU7tdBDqHkn41gUUXOT79 dlLctZwkYJyrPSlJfnFOurrVCLszk2XHuWFOe9qs0cYHJeE7Vl1B+PwNWoZ6Db4Gn2Sd xfWbGxPGs4bfTMMOjvlBi/1dymfJP50qe1wxAR0SYKAZegSFXGldHwKjfuDVY/sr/mXR FkpMtTZzlTclKOCz8lMXQSIZKeDx6wFat4rDqNrkdtgFaJma4UQBv41TDmZQkQiTk2y3 K82h3zVvzdeVDPeCTAiMvj7GFyCbmHaeqYDhq3aG5h7/iyea33zkMuZA2S/Zt5mLnGgS fqmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="n/UI6Mbo"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr8si3311099ejb.29.2020.12.29.03.03.46; Tue, 29 Dec 2020 03:04:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="n/UI6Mbo"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726203AbgL2LDU (ORCPT + 99 others); Tue, 29 Dec 2020 06:03:20 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:15633 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725866AbgL2LDT (ORCPT ); Tue, 29 Dec 2020 06:03:19 -0500 X-UUID: 68d9bcd55862430491e5a0946e429603-20201229 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=+tQiRgFVs1ecSRTznh8zWZJajSaxb1w3A0hIkVSyae4=; b=n/UI6MboHADW2FQSsUHlHdjWIrXq+Sxe5kdG/k6qclB8szLc/DbiUfqpWOo69QgmuHvy2sCCXdSXRKinxGTlVqIPk80mL0I6yAo/jjvPcJQqn021vwGuKzKOfqBo1eTTDK5YK+Gx68pJ+272vloCV/Lel4XN1p1pARwl/1KmNLY=; X-UUID: 68d9bcd55862430491e5a0946e429603-20201229 Received: from mtkcas36.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1009512425; Tue, 29 Dec 2020 19:02:22 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 29 Dec 2020 19:01:16 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 29 Dec 2020 19:00:20 +0800 Message-ID: <1609239620.26323.288.camel@mhfsdcap03> Subject: Re: [PATCH v5 15/27] iommu/mediatek: Add fail handle for sysfs_add and device_register From: Yong Wu To: Tomasz Figa CC: Joerg Roedel , Matthias Brugger , Rob Herring , Will Deacon , Robin Murphy , , , Nicolas Boichat , , , , Evan Green , Tomasz Figa , , , Krzysztof Kozlowski , , Date: Tue, 29 Dec 2020 19:00:20 +0800 In-Reply-To: References: <20201209080102.26626-1-yong.wu@mediatek.com> <20201209080102.26626-16-yong.wu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 9BAE3647D5E474D2917586CBBFB4911DB1B0897182843908B89A805325F57F062000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gV2VkLCAyMDIwLTEyLTIzIGF0IDE3OjI1ICswOTAwLCBUb21hc3ogRmlnYSB3cm90ZToNCj4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