phy: HiSilicon: Fix copy and paste bug in error handling
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 17 Nov 2021 07:48:43 +0000 (10:48 +0300)
committerVinod Koul <vkoul@kernel.org>
Tue, 23 Nov 2021 05:12:13 +0000 (10:42 +0530)
commitf0ae8685b2858fc1dabf5ea743642abb5f242375
treee9c7e9114873090f7d9a49ccae486bd61d5a2d36
parenta1b6c81ba41fe0458c3678e7fa23a25775978108
phy: HiSilicon: Fix copy and paste bug in error handling

This should check ">pmctrl" instead of "->sysctrl".  This bug could
potentially lead to a crash if we dereference the error pointer.

Fixes: 73075011ffff ("phy: HiSilicon: Add driver for Kirin 970 PCIe PHY")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20211117074843.GE5237@kili
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/hisilicon/phy-hi3670-pcie.c