net: stmmac: dwmac-visconti: No change to ETHER_CLOCK_SEL for unexpected speed request.
authorYuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
Thu, 27 Jan 2022 12:17:14 +0000 (21:17 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Feb 2022 17:34:09 +0000 (18:34 +0100)
commit6358e093547c5d9f3dcc4e42ec88d48be6202e4c
tree5ffc98d196585babaa65dfb4455cf1cb602b73eb
parent0ef6049f664941bc0f75828b3a61877635048b27
net: stmmac: dwmac-visconti: No change to ETHER_CLOCK_SEL for unexpected speed request.

commit 928d6fe996f69330ded6b887baf4534c5fac7988 upstream.

Variable clk_sel_val is not initialized in the default case of the first switch statement.
In that case, the function should return immediately without any changes to the hardware.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: b38dd98ff8d0 ("net: stmmac: Add Toshiba Visconti SoCs glue driver")
Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
Reviewed-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c