projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b2695f
)
drm/i915: Free write_buf that we allocated with kzalloc.
author
Rodrigo Vivi
<
[email protected]
>
Thu, 23 Aug 2018 20:51:36 +0000
(13:51 -0700)
committer
Rodrigo Vivi
<
[email protected]
>
Tue, 28 Aug 2018 19:50:43 +0000
(12:50 -0700)
We use kzalloc to allocate the write_buf that we use for
i2c transfer on hdcp write. But it seems that we are forgetting
to free the memory that is not needed after i2c transfer is
completed.
Reported-by: Brian J Wood <
[email protected]
>
Fixes: 2320175feb74 ("drm/i915: Implement HDCP for HDMI")
Cc: Ramalingam C <
[email protected]
>
Cc: Sean Paul <
[email protected]
>
Cc: Jani Nikula <
[email protected]
>
Cc: Rodrigo Vivi <
[email protected]
>
Cc: <
[email protected]
> # v4.17+
Signed-off-by: Rodrigo Vivi <
[email protected]
>
Reviewed-by: Chris Wilson <
[email protected]
>
Link:
https://patchwork.freedesktop.org/patch/msgid/
[email protected]
(cherry picked from commit
62d3a8deaa10b8346d979d0dabde56c33b742afa
)
Signed-off-by: Rodrigo Vivi <
[email protected]
>
drivers/gpu/drm/i915/intel_hdmi.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/intel_hdmi.c
b/drivers/gpu/drm/i915/intel_hdmi.c
index a9076402dcb0864ab6b7c6c4ea1d8346c95e949b..192972a7d287e9fd5ff9aeb599d6730007383500 100644
(file)
--- a/
drivers/gpu/drm/i915/intel_hdmi.c
+++ b/
drivers/gpu/drm/i915/intel_hdmi.c
@@
-943,8
+943,12
@@
static int intel_hdmi_hdcp_write(struct intel_digital_port *intel_dig_port,
ret = i2c_transfer(adapter, &msg, 1);
if (ret == 1)
- return 0;
- return ret >= 0 ? -EIO : ret;
+ ret = 0;
+ else if (ret >= 0)
+ ret = -EIO;
+
+ kfree(write_buf);
+ return ret;
}
static