]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: platform: Move plat_dat checking earlier
authorHuacai Chen <chenhc@lemote.com>
Thu, 27 Nov 2014 13:05:34 +0000 (21:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 30 Nov 2014 05:11:16 +0000 (21:11 -0800)
commit90f9686500b8597c0380dcb60a1d776aec92f16b
tree9f4b995f9f0f232f43346750e125ee462910a494
parent0746cbffbba4c953a7e617688c24a38c2ee30552
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: Huacai Chen <chenhc@lemote.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c