Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: qcom: qmp-usbc: Simplify check for non-NULL pointer

Pointers should not use explicit '0' comparison, so just use standard
evaluation as non-NULL:

phy-qcom-qmp-usbc.c:1682:31: warning: Using plain integer as NULL pointer

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260216110413.159994-6-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Vinod Koul
b6b7d1ae c77eee5b

+3 -3
+3 -3
drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
··· 1679 1679 if (ret) 1680 1680 return ret; 1681 1681 1682 - if (qmp->dp_serdes != 0) { 1682 + if (qmp->dp_serdes) { 1683 1683 ret = phy_dp_clks_register(qmp, np); 1684 1684 if (ret) 1685 1685 return ret; ··· 1833 1833 if (IS_ERR(base)) 1834 1834 return PTR_ERR(base); 1835 1835 1836 - if (offs->dp_serdes != 0) { 1836 + if (offs->dp_serdes) { 1837 1837 qmp->dp_serdes = base + offs->dp_serdes; 1838 1838 qmp->dp_tx = base + offs->dp_txa; 1839 1839 qmp->dp_tx2 = base + offs->dp_txb; ··· 1982 1982 1983 1983 phy_set_drvdata(qmp->usb_phy, qmp); 1984 1984 1985 - if (qmp->dp_serdes != 0) { 1985 + if (qmp->dp_serdes) { 1986 1986 qmp->dp_phy = devm_phy_create(dev, np, &qmp_usbc_dp_phy_ops); 1987 1987 if (IS_ERR(qmp->dp_phy)) { 1988 1988 ret = PTR_ERR(qmp->dp_phy);