Skip to content

Commit

Permalink
net: mdio-mux: Delete unnecessary devm_kfree
Browse files Browse the repository at this point in the history
The whole point of devm_* APIs is that you don't have to undo them if you
are returning an error that's going to get propagated out of a probe()
function. So delete unnecessary devm_kfree() call in the error return path.

Fixes: b601616 ("mdio: mux: Correct mdio_mux_init error path issues")
Signed-off-by: Saravana Kannan <saravanak@google.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Marc Zyngier <maz@kernel.org>
Tested-by: Marc Zyngier <maz@kernel.org>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Saravana Kannan authored and David S. Miller committed Aug 18, 2021
1 parent ed5d293 commit 663d946
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/mdio/mdio-mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ int mdio_mux_init(struct device *dev,
}

dev_err(dev, "Error: No acceptable child buses found\n");
devm_kfree(dev, pb);
err_pb_kz:
put_device(&parent_bus->dev);
err_parent_bus:
Expand Down

0 comments on commit 663d946

Please sign in to comment.