diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-01-26 07:51:48 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-01-26 07:51:48 +0100 |
commit | 4f2da3324eaff382ab1c6aaef8c10180b2f4d08c (patch) | |
tree | 38dab378ba4ad014d83151f020cc1e5979be0d6d /drivers/gpu/drm/msm/dp/dp_panel.c | |
parent | ALSA: hda/tegra: Remove unnecessary null-check from hda_tegra_runtime_resume() (diff) | |
parent | isa: Make the remove callback for isa drivers return void (diff) | |
download | linux-4f2da3324eaff382ab1c6aaef8c10180b2f4d08c.tar.xz linux-4f2da3324eaff382ab1c6aaef8c10180b2f4d08c.zip |
Merge tag 'tags/isa-void-remove-callback' into for-next
isa: Make the remove callback for isa drivers return void
Link: https://lore.kernel.org/r/20210122092449.426097-1-uwe@kleine-koenig.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/gpu/drm/msm/dp/dp_panel.c')
-rw-r--r-- | drivers/gpu/drm/msm/dp/dp_panel.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c b/drivers/gpu/drm/msm/dp/dp_panel.c index 97dca3e378b7..d1780bcac8cc 100644 --- a/drivers/gpu/drm/msm/dp/dp_panel.c +++ b/drivers/gpu/drm/msm/dp/dp_panel.c @@ -167,12 +167,18 @@ int dp_panel_read_sink_caps(struct dp_panel *dp_panel, panel = container_of(dp_panel, struct dp_panel_private, dp_panel); rc = dp_panel_read_dpcd(dp_panel); + if (rc) { + DRM_ERROR("read dpcd failed %d\n", rc); + return rc; + } + bw_code = drm_dp_link_rate_to_bw_code(dp_panel->link_info.rate); - if (rc || !is_link_rate_valid(bw_code) || + if (!is_link_rate_valid(bw_code) || !is_lane_count_valid(dp_panel->link_info.num_lanes) || (bw_code > dp_panel->max_bw_code)) { - DRM_ERROR("read dpcd failed %d\n", rc); - return rc; + DRM_ERROR("Illegal link rate=%d lane=%d\n", dp_panel->link_info.rate, + dp_panel->link_info.num_lanes); + return -EINVAL; } if (dp_panel->dfp_present) { |