Skip to content

Commit

Permalink
drm/rockchip: cdn-dp: Don't try to release firmware when not loaded
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-6-git-send-email-jeffy.chen@rock-chips.com
  • Loading branch information
Jeffy Chen authored and Sean Paul committed Apr 7, 2017
1 parent 37e0487 commit 54bd167
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/rockchip/cdn-dp-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,7 @@ static int cdn_dp_bind(struct device *dev, struct device *master, void *data)
dp->connected = false;
dp->active = false;
dp->active_port = -1;
dp->fw_loaded = false;

INIT_WORK(&dp->event_work, cdn_dp_pd_event_work);

Expand Down Expand Up @@ -1133,7 +1134,8 @@ static void cdn_dp_unbind(struct device *dev, struct device *master, void *data)
connector->funcs->destroy(connector);

pm_runtime_disable(dev);
release_firmware(dp->fw);
if (dp->fw_loaded)
release_firmware(dp->fw);
kfree(dp->edid);
dp->edid = NULL;
}
Expand Down

0 comments on commit 54bd167

Please sign in to comment.