]> git.baikalelectronics.ru Git - kernel.git/commit
phy: ti: ensure priv is not null before dereferencing it
authorColin Ian King <colin.king@canonical.com>
Sat, 22 Dec 2018 11:56:53 +0000 (11:56 +0000)
committerKishon Vijay Abraham I <kishon@ti.com>
Wed, 16 Jan 2019 12:30:54 +0000 (18:00 +0530)
commitf7132447a4ef7275f7951094061e90758f66a983
tree7db3d876d079b8491210f585c93de5948d368bb3
parent7f77c909bf011d452fec1332b07367de0632790d
phy: ti: ensure priv is not null before dereferencing it

Currently priv is being dereferenced before priv is being null checked.
Fix this by moving the null check on priv before the dereference.

Detected by CoverityScan, CID#1476018 ("Dereference before null check")

Fixes: 863b99c0506c ("phy: ti: introduce phy-gmii-sel driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/ti/phy-gmii-sel.c