disp: msm: fix always true/false conditionals

Remove unnecessary error conditionals that are
always true or false.

Change-Id: Ied1041b3165647364b741d3d95edca85039491c2
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This commit is contained in:
Samantha Tran
2020-09-17 14:48:43 -07:00
committed by Nilaan Gunabalachandran
parent df3f51f9c4
commit da5f5ff1ae
5 changed files with 5 additions and 10 deletions

View File

@@ -2533,9 +2533,9 @@ static int dsi_panel_parse_dsc_params(struct dsi_display_mode *mode,
*/
priv_info->dsc.config.dsc_version_major = (data >> 4) & 0x0F;
priv_info->dsc.config.dsc_version_minor = data & 0x0F;
if ((priv_info->dsc.config.dsc_version_major != 0x1) &&
if ((priv_info->dsc.config.dsc_version_major != 0x1) ||
((priv_info->dsc.config.dsc_version_minor
!= 0x1) ||
!= 0x1) &&
(priv_info->dsc.config.dsc_version_minor
!= 0x2))) {
DSI_ERR("%s:unsupported major:%d minor:%d version\n",

View File

@@ -570,7 +570,7 @@ static int validate_kick_off_v1(struct sde_reg_dma_kickoff_cfg *cfg)
return -EOPNOTSUPP;
}
if (cfg->ctl->idx < CTL_0 && cfg->ctl->idx >= CTL_MAX) {
if (cfg->ctl->idx < CTL_0 || cfg->ctl->idx >= CTL_MAX) {
DRM_ERROR("invalid ctl idx %d\n", cfg->ctl->idx);
return -EINVAL;
}

View File

@@ -404,11 +404,6 @@ static int reg_dmav1_get_dspp_blk(struct sde_hw_cp_cfg *hw_cfg,
return -EINVAL;
}
if (hw_cfg->dspp == NULL) {
DRM_ERROR("Invalid sde_hw_dspp structure provided in hw_cfg\n");
return -EINVAL;
}
if (blk == NULL) {
DRM_ERROR("Invalid payload provided\n");
return -EINVAL;

View File

@@ -1452,7 +1452,7 @@ static void sde_kms_complete_commit(struct msm_kms *kms,
return;
priv = sde_kms->dev->dev_private;
if (sde_kms_power_resource_is_enabled(sde_kms->dev) < 0) {
if (!sde_kms_power_resource_is_enabled(sde_kms->dev)) {
SDE_ERROR("power resource is not enabled\n");
return;
}

View File

@@ -66,7 +66,7 @@ TRACE_EVENT(sde_perf_update_bus,
unsigned long long ib_quota, u32 paths),
TP_ARGS(bus_id, ab_quota, ib_quota, paths),
TP_STRUCT__entry(
__field(u32, bus_id);
__field(u32, bus_id)
__field(u64, ab_quota)
__field(u64, ib_quota)
__field(u32, paths)