Skip to content

Commit b6b7d1a

Browse files
krzkvinodkoul
authored andcommitted
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>
1 parent c77eee5 commit b6b7d1a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/phy/qualcomm/phy-qcom-qmp-usbc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ static int qmp_usbc_register_clocks(struct qmp_usbc *qmp, struct device_node *np
16791679
if (ret)
16801680
return ret;
16811681

1682-
if (qmp->dp_serdes != 0) {
1682+
if (qmp->dp_serdes) {
16831683
ret = phy_dp_clks_register(qmp, np);
16841684
if (ret)
16851685
return ret;
@@ -1833,7 +1833,7 @@ static int qmp_usbc_parse_dt(struct qmp_usbc *qmp)
18331833
if (IS_ERR(base))
18341834
return PTR_ERR(base);
18351835

1836-
if (offs->dp_serdes != 0) {
1836+
if (offs->dp_serdes) {
18371837
qmp->dp_serdes = base + offs->dp_serdes;
18381838
qmp->dp_tx = base + offs->dp_txa;
18391839
qmp->dp_tx2 = base + offs->dp_txb;
@@ -1982,7 +1982,7 @@ static int qmp_usbc_probe(struct platform_device *pdev)
19821982

19831983
phy_set_drvdata(qmp->usb_phy, qmp);
19841984

1985-
if (qmp->dp_serdes != 0) {
1985+
if (qmp->dp_serdes) {
19861986
qmp->dp_phy = devm_phy_create(dev, np, &qmp_usbc_dp_phy_ops);
19871987
if (IS_ERR(qmp->dp_phy)) {
19881988
ret = PTR_ERR(qmp->dp_phy);

0 commit comments

Comments
 (0)