Remove unnecessary error conditionals that are always true or false. Change-Id: Ied1041b3165647364b741d3d95edca85039491c2 Signed-off-by: Samantha Tran <[email protected]> Signed-off-by: Nilaan Gunabalachandran <[email protected]>
@@ -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",
@@ -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;
@@ -404,11 +404,6 @@ static int reg_dmav1_get_dspp_blk(struct sde_hw_cp_cfg *hw_cfg,
- 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");
@@ -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");
@@ -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)