Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH] PCI: histb: Remove an unneeded NULL test in histb_pcie_remove()
@ 2025-03-15 17:00 Christophe JAILLET
  2025-03-16 11:57 ` Krzysztof Wilczyński
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2025-03-15 17:00 UTC (permalink / raw)
  To: Shawn Guo, Lorenzo Pieralisi, Krzysztof Wilczyński,
	Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-pci

phy_exit() handles NULL as a parameter, so there is no need for an extra
test.
This makes the code consistent with the error handling path of the probe.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Follow up to commit d8dba4a635bc, where the NULL check from the patch in
the Link: was removed when applied.
---
 drivers/pci/controller/dwc/pcie-histb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-histb.c b/drivers/pci/controller/dwc/pcie-histb.c
index d84e46ca4490..1f2f4c28a949 100644
--- a/drivers/pci/controller/dwc/pcie-histb.c
+++ b/drivers/pci/controller/dwc/pcie-histb.c
@@ -432,8 +432,7 @@ static void histb_pcie_remove(struct platform_device *pdev)
 
 	histb_pcie_host_disable(hipcie);
 
-	if (hipcie->phy)
-		phy_exit(hipcie->phy);
+	phy_exit(hipcie->phy);
 }
 
 static const struct of_device_id histb_pcie_of_match[] = {
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI: histb: Remove an unneeded NULL test in histb_pcie_remove()
  2025-03-15 17:00 [PATCH] PCI: histb: Remove an unneeded NULL test in histb_pcie_remove() Christophe JAILLET
@ 2025-03-16 11:57 ` Krzysztof Wilczyński
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Wilczyński @ 2025-03-16 11:57 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Shawn Guo, Lorenzo Pieralisi, Manivannan Sadhasivam, Rob Herring,
	Bjorn Helgaas, linux-kernel, kernel-janitors, linux-pci

Hello,

> phy_exit() handles NULL as a parameter, so there is no need for an extra
> test.
> This makes the code consistent with the error handling path of the probe.

Thank you for the due diligence here!  Much appreciated.

I squashed this patch against the changes already on the branch.

Thank you!

	Krzysztof

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-16 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-15 17:00 [PATCH] PCI: histb: Remove an unneeded NULL test in histb_pcie_remove() Christophe JAILLET
2025-03-16 11:57 ` Krzysztof Wilczyński

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox