1
0
Fork 0
alistair23-linux/drivers/net/ethernet/cortina
Dan Carpenter 612e2b7ec9 net: gemini: Fix another missing clk_disable_unprepare() in probe
[ Upstream commit eb0f3bc463 ]

We recently added some calls to clk_disable_unprepare() but we missed
the last error path if register_netdev() fails.

I made a couple cleanups so we avoid mistakes like this in the future.
First I reversed the "if (!ret)" condition and pulled the code in one
indent level.  Also, the "port->netdev = NULL;" is not required because
"port" isn't used again outside this function so I deleted that line.

Fixes: 4d5ae32f5e ("net: ethernet: Add a driver for Gemini gigabit ethernet")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-09 19:12:28 +02:00
..
Kconfig
Makefile
gemini.c net: gemini: Fix another missing clk_disable_unprepare() in probe 2020-09-09 19:12:28 +02:00
gemini.h net: ethernet: Use the correct style for SPDX License Identifier 2019-10-25 19:30:31 -07:00