Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp478170lqo; Thu, 16 May 2024 11:32:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkDdvdoLcbJszOF0zVqHms1mJ0bYVAoBnXVFlKSYJqXSXwO/mkw6IxoPGzq4EbCF7Dve+krcrD0QKrJnoP8vZ/yJxbjq4le6g08hpG7Q== X-Google-Smtp-Source: AGHT+IGIRyJeYjiFpnQpZ99jVQNbk93B15HggemRobUzvL0zZy8y2ZFBZtUusWVRXMbfkMEz2g70 X-Received: by 2002:a05:6a00:179f:b0:6f4:3fe7:7aa9 with SMTP id d2e1a72fcca58-6f4e02aa523mr23258333b3a.10.1715884340105; Thu, 16 May 2024 11:32:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715884340; cv=pass; d=google.com; s=arc-20160816; b=EQt95giuQZiaIpm97IG9uoce87Q4pBjkpebxJl0Q3Ra5qkqDx5/WjI80UxMAIpruy5 49aEvdfOmZgBBh1ppXt2wyRqs59UaNZuKlX1qNqtKRwEGgUoXmsOeOErF96QnlVza2KF 8oyGc5UIZQNgT4FCdTYXIUGiACk+Jp80KWAC/bLIbau9JbJQbuxxRkcU4yhuOQJjdsFa sEoCcflFJ/FORpQuo2wT3RZOGUom3ttD5g6VS/tzjyte/mUEKYgWKPnK6a3PCSr+oM3W M8V2eDPRmtiHizdch/Zj2cXEt7reIWxaPMopiA5zUcc9ORCILItLo6GJ/4DExRy9tufq tUYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=lFmEKEVqDlmQndwRBXHA+wm3UdLuPoyhnFJMvDQ5EkU=; fh=r7jucx4EDwcx4QmKdJY/B/BWs7eG+xdxvoZ3FO/I2uA=; b=nhoJ+NC080c/7UCBay9zi8vLU/qgJoISbG4pQrarUChbW3PMKpHN09KpQFjaVh/pqA egXPGedjVVTNR2KHU451SQg6b2tPwHts3DbAUZ8cU2H6IXD/r5GIVyNXp6l0s3P52+p4 WEitdvRjUBe1CqPeM/mOoNHp8WFr8/Ug/rcQEymU+GAZXj0bjqOtnMdYvQz+GK1CKWYx 4pSpVH4xBuDId+xFKu3hJ3VcN7r7byFArwvvZu5hM2f0OjiaY23tTQS3qTG0mGohfe3B 5c95LY9KbsOm09J0Jn0ZTvgFmvlNuaUVRrnG7iuguI1Z8NSFeqthzW0s3cydaHgJ2SGA Ag0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=MvNsBT5v; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-181461-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181461-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2b170b5si16183765b3a.229.2024.05.16.11.32.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 11:32:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181461-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=MvNsBT5v; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-181461-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181461-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 56EC1B2204C for ; Thu, 16 May 2024 18:27:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 761D515EFBB; Thu, 16 May 2024 18:19:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="MvNsBT5v" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3470215ECC7; Thu, 16 May 2024 18:19:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715883587; cv=none; b=ODBIRCfDn0r9X1JZ99N48aTtr10SctW0YX0Kuqftgj2r2O97bkK+x5Vv+WbVIhckXuENZnKyH+NXRoJcS1sJ4wE3a3Q0WxozXnZw5Qw8K2LgT2RuRKVr6CCklUSgscn5TZfN6Pp2KWho6m9/+M1fO9LSVnPD9sT8JjCdxOZpLYQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715883587; c=relaxed/simple; bh=29/9KUZooO4stvwvYPLKrE62MlA801JzrHHd80rVNCA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lEWook3MJRIMfJdXwWv0odsJz2kT71lASvLKdFUWyON76bAGbPSWC5uBjYr/9s66KteaHVe1psOnUpBmSQQYriOofSmv/rtZeGMqA+DnO4y0e2LLk2fw7tJj1XDYRRCoh7jQ8dHkZU6YovXQZgjwoHgPklraC3d2LLSFApr2V2Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=MvNsBT5v; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44GEwVq5032671; Thu, 16 May 2024 18:19:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=lFmEKEVqDlmQndwRBXHA+wm3UdLuPoyhnFJMvDQ5EkU=; b=MvNsBT5vEe7MSO5wi1MdPYMqZ++n13qE95FpPL1fN/OkDXprnxArOH+1DVgbnzidlH4K sD+SYbxrGDSqUoeGaHlQJ+RiGcNwUrEsywdngVzDXb9s8dqa/pmrnPNYJbi0GwuUnOHT /3HzsORWg6gri9QvT3eY7kzZLwpr2xAYib9bfcK/HPD36WlNHnsPB371BpXsylIwehEo 86XYPtcocCTdFXeZ0E8FlSttDS29zaj7mD20DVYfwgzud3TzZhkJqDtzWHg+KtVo4N5V NIe3koyMa+3dd9XlwiSofeQ9fWAQvi5xmWnUgLdC8N1zCln/cF+Qtt3BME3YlNasWT0i Yg== Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3y5mce8frm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 May 2024 18:19:15 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 44GHjhb4002298; Thu, 16 May 2024 18:19:15 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3y2m0pkfue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 May 2024 18:19:15 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 44GIJCuP8848072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 May 2024 18:19:14 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6828E5807D; Thu, 16 May 2024 18:19:12 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 28E5058089; Thu, 16 May 2024 18:19:12 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.107.19]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 16 May 2024 18:19:12 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-spi@vger.kernel.org, broonie@kernel.org, andi.shyti@kernel.org, joel@jms.id.au, alistair@popple.id.au, jk@ozlabs.org, andrew@codeconstruct.com.au, linux-aspeed@lists.ozlabs.org, eajames@linux.ibm.com Subject: [PATCH v3 16/40] fsi: aspeed: Remove cfam reset sysfs file in error path and remove Date: Thu, 16 May 2024 13:18:43 -0500 Message-Id: <20240516181907.3468796-17-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240516181907.3468796-1-eajames@linux.ibm.com> References: <20240516181907.3468796-1-eajames@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 0rRQTlx8XMLnnahiLPxS5tdfOSsLnClr X-Proofpoint-ORIG-GUID: 0rRQTlx8XMLnnahiLPxS5tdfOSsLnClr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=935 phishscore=0 adultscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 bulkscore=0 mlxscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405160132 This fixes a duplicate sysfs warning on device re-probe. Fixes: 4a851d714ead ("fsi: aspeed: Support CFAM reset GPIO") Signed-off-by: Eddie James --- drivers/fsi/fsi-master-aspeed.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c index a67f185bb8814..29932037c9866 100644 --- a/drivers/fsi/fsi-master-aspeed.c +++ b/drivers/fsi/fsi-master-aspeed.c @@ -437,6 +437,7 @@ static int setup_cfam_reset(struct fsi_master_aspeed *aspeed) rc = device_create_file(dev, &dev_attr_cfam_reset); if (rc) { + aspeed->cfam_reset_gpio = NULL; devm_gpiod_put(dev, gpio); return rc; } @@ -615,6 +616,9 @@ static int fsi_master_aspeed_probe(struct platform_device *pdev) err_regmap: regmap_exit(aspeed->master.map); err_release: + if (aspeed->cfam_reset_gpio) + device_remove_file(aspeed->dev, &dev_attr_cfam_reset); + clk_disable_unprepare(aspeed->clk); err_free_aspeed: kfree(aspeed); @@ -625,6 +629,9 @@ static int fsi_master_aspeed_remove(struct platform_device *pdev) { struct fsi_master_aspeed *aspeed = platform_get_drvdata(pdev); + if (aspeed->cfam_reset_gpio) + device_remove_file(aspeed->dev, &dev_attr_cfam_reset); + fsi_master_unregister(&aspeed->master); clk_disable_unprepare(aspeed->clk); -- 2.39.3