diff options
author | Jeffy Chen <jeffy.chen@rock-chips.com> | 2017-04-06 20:31:18 +0800 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2017-04-07 13:28:32 -0400 |
commit | 54bd16780e2b7bcbe7096baab94e2454686f0941 (patch) | |
tree | 10fdeeaa4279314d301e3c7c8e8b8bb84e302183 | |
parent | 37e0487788468cc0dfef678f4d10339c28ad80e5 (diff) | |
download | linux-54bd16780e2b7bcbe7096baab94e2454686f0941.tar.bz2 |
drm/rockchip: cdn-dp: Don't try to release firmware when not loaded
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
-rw-r--r-- | drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index 4e55d63c3ef3..ee4195d6592c 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -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); @@ -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; } |