Commit d02dfd4c authored by Rob Herring (Arm)'s avatar Rob Herring (Arm) Committed by Vinod Koul
Browse files

phy: can-transceiver: Drop unnecessary "mux-states" property presence check



It doesn't matter whether "mux-states" is not present or there is some
other issue parsing it causing an error. Drop the presence check and
rework the error handling to ignore anything other than deferred probe.

Acked-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250203185421.3383805-2-robh@kernel.org


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 0d8db251
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
	struct phy *phy;
	struct gpio_desc *standby_gpio;
	struct gpio_desc *enable_gpio;
	struct mux_state *mux_state;
	u32 max_bitrate = 0;
	int err;

@@ -113,13 +114,11 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
	match = of_match_node(can_transceiver_phy_ids, pdev->dev.of_node);
	drvdata = match->data;

	if (of_property_read_bool(dev->of_node, "mux-states")) {
		struct mux_state *mux_state;

	mux_state = devm_mux_state_get(dev, NULL);
		if (IS_ERR(mux_state))
			return dev_err_probe(&pdev->dev, PTR_ERR(mux_state),
					     "failed to get mux\n");
	if (IS_ERR(mux_state)) {
		if (PTR_ERR(mux_state) == -EPROBE_DEFER)
			return PTR_ERR(mux_state);
	} else {
		can_transceiver_phy->mux_state = mux_state;
	}