summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c')
-rw-r--r--drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
index 6b4759ed6bfd..c491429f1a02 100644
--- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
+++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
@@ -131,8 +131,10 @@ sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in)
return false;
txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL);
- if (!txmsg)
+ if (!txmsg) {
+ kfree(out);
return false;
+ }
drm_dp_encode_sideband_req(in, txmsg);
ret = drm_dp_decode_sideband_req(txmsg, out);