Skip to content
Commit 28603d13 authored by Huacai Chen's avatar Huacai Chen Committed by David S. Miller
Browse files

stmmac: platform: Move plat_dat checking earlier



Original code only check/alloc plat_dat for the CONFIG_OF case, this
patch check/alloc it earlier and unconditionally to avoid kernel build
warnings:

drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:275
stmmac_pltfr_probe() warn: variable dereferenced before check 'plat_dat'

V2: Fix coding style.

Signed-off-by: default avatarHuacai Chen <chenhc@lemote.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4d6a949c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment