Re: [PATCH net] net: gemini: Fix another missing clk_disable_unprepare() in probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date: Wed, 2 Sep 2020 14:56:31 +0300

> 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: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit ethernet")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Applied and queued up for -stable, thanks.

Unrelated to your patch but...

>  	ret = register_netdev(netdev);
 ...
> +	ret = gmac_setup_phy(netdev);

Should we really be setting up the PHY after registering the netdev?

The moment we register it, entities can try to bring the interface up
and shouldn't we have the PHY bits all squared away before that?



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux