Commit a7d5fe02 authored by Claudiu Beznea's avatar Claudiu Beznea Committed by Greg Kroah-Hartman
Browse files

usb: host: Do not check priv->clks[clk]



There is no need to check the entries in priv->clks[] array before passing
it to clk_disable_unprepare() as the clk_disable_unprepare() already
check if it receives a NULL or error pointer as argument. Remove this
check. This makes the code simpler.

Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251106143625.3050119-2-claudiu.beznea.uj@bp.renesas.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 66371878
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -112,7 +112,6 @@ static void ehci_platform_power_off(struct platform_device *dev)
	int clk;

	for (clk = EHCI_MAX_CLKS - 1; clk >= 0; clk--)
		if (priv->clks[clk])
		clk_disable_unprepare(priv->clks[clk]);
}

+1 −2
Original line number Diff line number Diff line
@@ -69,7 +69,6 @@ static void ohci_platform_power_off(struct platform_device *dev)
	int clk;

	for (clk = OHCI_MAX_CLKS - 1; clk >= 0; clk--)
		if (priv->clks[clk])
		clk_disable_unprepare(priv->clks[clk]);
}