Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6040796ybi; Wed, 29 May 2019 01:47:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqytqwTyq9GUvp6tVwGT0U1J7vgpnIYGnG/9/nY9IF5d0zDGpu8eo4cMk2Cr0pC/2ghQ1mzk X-Received: by 2002:a63:6c83:: with SMTP id h125mr89220543pgc.86.1559119676668; Wed, 29 May 2019 01:47:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559119676; cv=none; d=google.com; s=arc-20160816; b=RviO/XpyoN8rf6V/P8qKUS+USheC0RaXeS1FPfUJursJB/ngY8C29L/KkSHISP6mAp TAXtZRJN6gy4AOPidSNWLNRNr37dP4XF4ydTcGOljCr/CXgSfQg48T9o/wfptAGYDG4q MBICc49OOFLLtVAnNWxxgQD90iLZL8RjJ+CclnsYd62pceZpZQbdzh/gpfwbYt7mAFfX GAwNzU0WvNnDbWcXk9R/P62bu//mwhr7otZyjJK+AAGHtNPNNszNycxEfrFgONA2pUrr 4/TKZkQXnGeU0vVgJ47vDt6nccASvvyXuad/Y6VnNzJuRvMrj0+Mf2Ap41dCLXcxgXHP Wnfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=lQoZq7loVV5pKhsOJFBMbaakQmiE1B08uig6ldsAt6M=; b=mhJRu8OMLhYLEmwda/IrNx5kEvoG9P1FWWw4zuc4P/Okzp1KGos2nRVY+5nhBcaf2W NSLzLzxMlJOY4HwXsQHGRTOTG473wBboMaGSfx/5ho3Cr21tKAKbc1jMTlQaUGX/ddBi k8YF0BTaEEf+XhbIvIn1Q+Xe1CiUt2IVSosyFyjoh55aM+JvsU+cCeBggRt4uiQPq4in 05s7I1CWz3jeyMNbpWkgCJXqdkLhVVfFBqXgsN8b9ZYGhMnPEa4bGW7ZlHxFp0igE7Xp dQ49daMnhddQVAtRXNkMxM84mlnlUcjr0Qc9NRw8LhWs806iK1iRPmzkWBviMYvjPZj/ g7FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0818 header.b="qFaeIO0/"; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector2-marvell-onmicrosoft-com header.b=nYyzid2i; 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=marvell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si25722627pgh.273.2019.05.29.01.47.41; Wed, 29 May 2019 01:47:56 -0700 (PDT) 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=@marvell.com header.s=pfpt0818 header.b="qFaeIO0/"; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector2-marvell-onmicrosoft-com header.b=nYyzid2i; 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=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726330AbfE2Ipy (ORCPT + 99 others); Wed, 29 May 2019 04:45:54 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:35312 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725888AbfE2Io0 (ORCPT ); Wed, 29 May 2019 04:44:26 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4T8eGJr022570; Wed, 29 May 2019 01:44:09 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=lQoZq7loVV5pKhsOJFBMbaakQmiE1B08uig6ldsAt6M=; b=qFaeIO0/2YcH4AQe77VJHrIjl8IMjqz42/5m3lO7w76a4M4h1cXcvo8JCd1HNM7WXYE9 8E8317C6LOlk+HLBjmfHnsUkyNahNOd0O82sgPqXgyy4ZZRcM6tGZP5/pBndLxestw8i 3ZwruiQrTf9BkHxGPAcA2lCsSG/lIPZSDCOL3gfe/P6CCyTZSzp81BLUtFTOhufJPMLc XQdsLbXxCde+vY94C/KQvKp/0vkiLIi3jb5LDs3NAIfKKyC30MfI7AFTcm8iQHQ5vz5O qDenoHAOGVuo5QNigh8vVyPXm59G1uyaW1eiObuvXUUHYk04+LaoQddFV8GryfuTYx5D Yg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2sspkpg1ns-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 29 May 2019 01:44:09 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 29 May 2019 01:44:08 -0700 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (104.47.40.53) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 29 May 2019 01:44:08 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lQoZq7loVV5pKhsOJFBMbaakQmiE1B08uig6ldsAt6M=; b=nYyzid2i8u/dH7Mba8PO+2esypbKTHo8SyeYs4hsvT+GSbWdo+dsZHYb4PPo8vjOBUsbR+joz2G0U0I7UypXYscJ3jExMyXqVNqCL1e/0c6EnHScUrRKxrWvLlJqixtU9pKgEP+wZoNDi0Mdo6Xox0iWSok4MELer5rgMTsVA1k= Received: from MN2PR18MB3408.namprd18.prod.outlook.com (10.255.238.217) by MN2PR18MB3437.namprd18.prod.outlook.com (10.255.239.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.20; Wed, 29 May 2019 08:44:05 +0000 Received: from MN2PR18MB3408.namprd18.prod.outlook.com ([fe80::7c9a:f3bf:fe2e:fe4a]) by MN2PR18MB3408.namprd18.prod.outlook.com ([fe80::7c9a:f3bf:fe2e:fe4a%4]) with mapi id 15.20.1922.021; Wed, 29 May 2019 08:44:05 +0000 From: Robert Richter To: Borislav Petkov , Tony Luck , "James Morse" , Mauro Carvalho Chehab CC: "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Robert Richter Subject: [PATCH 02/21] EDAC: Fixes to use put_device() after device_add() errors Thread-Topic: [PATCH 02/21] EDAC: Fixes to use put_device() after device_add() errors Thread-Index: AQHVFfqscON641zZekePQqJCvaQr+Q== Date: Wed, 29 May 2019 08:44:05 +0000 Message-ID: <20190529084344.28562-3-rrichter@marvell.com> References: <20190529084344.28562-1-rrichter@marvell.com> In-Reply-To: <20190529084344.28562-1-rrichter@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6PR01CA0046.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::23) To MN2PR18MB3408.namprd18.prod.outlook.com (2603:10b6:208:16c::25) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [78.54.13.57] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ff4239af-1494-4fd7-a0a2-08d6e411ceda x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:MN2PR18MB3437; x-ms-traffictypediagnostic: MN2PR18MB3437: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:78; x-forefront-prvs: 0052308DC6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(346002)(396003)(376002)(39860400002)(136003)(189003)(199004)(8936002)(4326008)(53936002)(50226002)(110136005)(107886003)(68736007)(36756003)(5660300002)(54906003)(11346002)(26005)(186003)(52116002)(2906002)(2616005)(476003)(446003)(6506007)(14454004)(66476007)(25786009)(478600001)(386003)(86362001)(486006)(81166006)(81156014)(8676002)(305945005)(316002)(7736002)(14444005)(256004)(99286004)(76176011)(6512007)(6436002)(73956011)(64756008)(66446008)(66556008)(66066001)(3846002)(66946007)(1076003)(6486002)(102836004)(71190400001)(71200400001)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR18MB3437;H:MN2PR18MB3408.namprd18.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: bQRXuxXA9tqwgHThqmWOYDPJiRxEPf7MYMootEWS/hFcgnw8btZg1ow57taOHsiEY2AYKgZyToEz39kiAXGOZOfiGvFF9fiZuHdglX1dIswwZKNuG+0I/2lIY/UgZEpPaqrFOKL7c0wNvd5ryBhE0DJtZAxHmKubSqNcg3jgmlybB+QkpceXlHpWVSCKxzVbJKLl83t9q5T8rhWN4SE4ghc1y1I78KdqsvIC5uEKiFk7AU6v80ygOTJOvNv0IJth7TOFjl1fjHoSo1WXtjQCX6eTeJ4Uwxd8Z95LWGQwijpzGD69k8dhK9cMuz5HbemEdaON8Qn2bBEtS18Cq0OH69CeRgliUdtbFZSWbUeLEpfUuhbEYv+B58jZ6WirUJHRsLV7yUJpt7WqXRm1PkjfnptQOs9+A6uiOx/b8PvFKW0= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ff4239af-1494-4fd7-a0a2-08d6e411ceda X-MS-Exchange-CrossTenant-originalarrivaltime: 29 May 2019 08:44:05.8207 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rrichter@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3437 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-29_05:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QWx3YXlzIHVzZSBwdXRfZGV2aWNlKCkgYWZ0ZXIgZGV2aWNlX2FkZCgpIGZhaWxlZC4NCg0KU2ln bmVkLW9mZi1ieTogUm9iZXJ0IFJpY2h0ZXIgPHJyaWNodGVyQG1hcnZlbGwuY29tPg0KLS0tDQog ZHJpdmVycy9lZGFjL2VkYWNfbWNfc3lzZnMuYyB8IDM2ICsrKysrKysrKysrKysrKysrKystLS0t LS0tLS0tLS0tLS0tLQ0KIDEgZmlsZSBjaGFuZ2VkLCAxOSBpbnNlcnRpb25zKCspLCAxNyBkZWxl dGlvbnMoLSkNCg0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvZWRhYy9lZGFjX21jX3N5c2ZzLmMgYi9k cml2ZXJzL2VkYWMvZWRhY19tY19zeXNmcy5jDQppbmRleCA0NjQxNzQ2ODU1ODkuLmRiZWY2OTkx NjJhOCAxMDA2NDQNCi0tLSBhL2RyaXZl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