]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
video: tegra: Incorrect operator used
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Wed, 1 Oct 2025 11:55:37 +0000 (12:55 +0100)
committerSvyatoslav Ryhel <clamor95@gmail.com>
Tue, 28 Oct 2025 09:27:44 +0000 (11:27 +0200)
Combining two bits into a mask requires the use of the binary 'or'
operator not the logical one. Correct it.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Svyatoslav Ryhel <clamor95@gmail.com>
drivers/video/tegra/tegra124/sor.c

index 1ce5330c6bcf8750c5a5adb3c92ccd8743d01b59..ccdeefbcbb1edb15a4bacfbbe770da0f88f55300 100644 (file)
@@ -336,7 +336,7 @@ static int tegra_dc_sor_io_set_dpd(struct tegra_dc_sor_data *sor, int up)
        }
 
        reg_val = readl(pmc_base + APBDEV_PMC_IO_DPD2_REQ);
-       reg_val &= ~(APBDEV_PMC_IO_DPD2_REQ_LVDS_ON ||
+       reg_val &= ~(APBDEV_PMC_IO_DPD2_REQ_LVDS_ON |
                        APBDEV_PMC_IO_DPD2_REQ_CODE_DEFAULT_MASK);
 
        reg_val = up ? APBDEV_PMC_IO_DPD2_REQ_LVDS_ON |