Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp742205rdb; Thu, 15 Feb 2024 14:11:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUI9qrsSlxOcl0NbfcyDrvKwEqhjvHWfZjonjg+FUl60IVaie1cjdvs5/EDoGqut7PIYkb7hlNllc9+p3fdftyOp4SG3dcF0j8Lb3EltQ== X-Google-Smtp-Source: AGHT+IEkdKsrngNik8Z7u+oyPi07ft/OJV76Yt8Ellibvq5/I+L9Tp7d4Tq+Pa/c7EgoMWxhbLMx X-Received: by 2002:a05:6a21:3994:b0:19c:a4d3:2041 with SMTP id ad20-20020a056a21399400b0019ca4d32041mr4185063pzc.42.1708035099889; Thu, 15 Feb 2024 14:11:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708035099; cv=pass; d=google.com; s=arc-20160816; b=JWD+79LI+oYitN08if5glBNjqoz2h/rLpWT/O4+JQy3LytdaEn5qKr39sP90cCMgrp BZZq0Dy7h5OxHZmDD/mpvJgbv+UwzxHqlCLN0En7dHAUmzOA0N5AdK6p2ZKb1PLx0RKl 5HPz7ZyN2kSiv6x6pZPZB6U88JIOL1AJNVsEVa3V4antzVTW3ztJ6REihHLmT/ngIJX1 5awhqbYAqbOZLWDKbEDM9XGMdF/gET8oKBbB2a63gPvTLAYglR8SsjxUhwD5tTnZJqTi aaTexuZi9HOrp1oXgH5g+f6Kf2qspKdBmSK+M9kLp4G/ew5945uKAWGOBbUTk0bDkgSc Ph1g== 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=BoYmg2I4Q0k+a3TaU4ABCYR9yHgcAHY+742VsQ7xQZc=; fh=Usz7XAB1EI7Q/DdLEXd449E1MLGpSzqdCCNe5XKh9R0=; b=PgiNRlBYepgNlST0OyyzJHX4D9vvrqueZ6vicG5b4JKgrbZ4zz+59UbhPvb7X+4rxA nGXpBP3b5bKBPnxoBWPOWYiz1Ok5LWU/rqkaHL2uad02SWCnfKxIb5AYHrrOv/qIzP+U PiW0o+V4oOa8X7+MRjqzjwNL2XlJYAJYCkQrFcmNaGpIUvmPrwPs4dLaY1ldfRRru8tG bhDkWcDknjmKCL3LVHbH1Cx/LBH1UbZa//5hIo0DBNZ2ToyyLw2egg9yUNgn5Qv2SuF0 r37tNOoaODO4L/PZ0cZE3vflojmeWyM+Q6MxKyR7Vs6XRnZ02MyK7cy53RtHo1GPmjwc 8o5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=nPxhchfI; 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-67750-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a17-20020a637051000000b005dc93b2bc4asi1717630pgn.885.2024.02.15.14.11.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:11:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67750-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=nPxhchfI; 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-67750-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67750-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7CB6D2818DA for ; Thu, 15 Feb 2024 22:11:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24B5614A0A8; Thu, 15 Feb 2024 22:08:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="nPxhchfI" 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 8A32D146916; Thu, 15 Feb 2024 22:08:27 +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=1708034909; cv=none; b=JNK9L7nzEw6XLpDPXAZezhyHhU3+b9aL86vV8zr+xjBUNxP8gQL6onWPel1od3UFz5Bl/egAAyx+3CEqlyiX8a1X2yN4y5/hhbINY8HCT9pwxRmDxaj0VKfZCwC2nRbDnM179wM9GZ2aLE7mabGa6qMsT1plLAmYxz0K8NQTFY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708034909; c=relaxed/simple; bh=8Ct3J2NJkURDInEhDXz003U01AuCHf4/0dNy3zQDeEk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZTG8Qdics8WvlvDRSIdzMtTgtEXj+Jz3kgGZ31uo3jfLnd5ri6nagIyud63j7Q2FAmMEADt76T7L8sA0ebiXjimSwosIizt7AYdymphyP27EfP3H4QESsQx4rgwQ92wt1KL0nMZfDFWOSSTSzyFU1m0QsM4SO/3l8Pvu1sXcWpE= 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=nPxhchfI; 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 (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41FM0XVx017942; Thu, 15 Feb 2024 22:08:13 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=BoYmg2I4Q0k+a3TaU4ABCYR9yHgcAHY+742VsQ7xQZc=; b=nPxhchfIkH2wViv3C6u2zH7XROEw2xoNVuvA1hfEIUgA6YNhtxmyn2aPdaWwz0y/p+6/ exuQw+XJIfY5FTTsqclVIPSsqc2LlcV83hijqHh0OWcf0OY2SQem6X3vOM0eVA4JQb6E UtFU5860C3jCIHl9MquvZcAzOj5T+Q99m69mKygTDdl74XoScKjKsJ835LBR9WJsq59U rHr9qyq54eAnQVkIlK2XTzzq0aG4uv+zaae1dn3JK8zxlQZ6N6nfZZl9l8TSSS+V8PpC g3IumJvERLjqTyWbY2OUzWUD0TbVhqjySimU1mV4V7YmOGlv9B8NS3MI27kAyn9XfN9T 5Q== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w9u1bg6ak-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Feb 2024 22:08:12 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41FJfrBX016479; Thu, 15 Feb 2024 22:08:12 GMT Received: from smtprelay06.dal12v.mail.ibm.com ([172.16.1.8]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3w6mymyhcn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Feb 2024 22:08:11 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay06.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41FM89ED64815402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 22:08:11 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AD99F58073; Thu, 15 Feb 2024 22:08:07 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5941C58078; Thu, 15 Feb 2024 22:08:07 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.14.18]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 15 Feb 2024 22:08:07 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, andi.shyti@kernel.org, eajames@linux.ibm.com, alistair@popple.id.au, joel@jms.id.au, jk@ozlabs.org, sboyd@kernel.org, mturquette@baylibre.com, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Subject: [PATCH 16/33] fsi: aspeed: Remove cfam reset sysfs file in error path and remove Date: Thu, 15 Feb 2024 16:07:42 -0600 Message-Id: <20240215220759.976998-17-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240215220759.976998-1-eajames@linux.ibm.com> References: <20240215220759.976998-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: lWmY2azHfseoGHZSM51FysPjP0lIPbJt X-Proofpoint-ORIG-GUID: lWmY2azHfseoGHZSM51FysPjP0lIPbJt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-15_20,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=931 bulkscore=0 phishscore=0 adultscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402150171 This fixes a duplicate sysfs warning on device re-probe. 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 2258980e4c47..c36e7e49e965 100644 --- a/drivers/fsi/fsi-master-aspeed.c +++ b/drivers/fsi/fsi-master-aspeed.c @@ -410,6 +410,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; } @@ -575,6 +576,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); @@ -585,6 +589,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