diff options
-rw-r--r-- | drivers/gpu/drm/radeon/atom.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index 247f8ee7e940..58845e053b36 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c | |||
@@ -1136,6 +1136,7 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 | |||
1136 | int len, ws, ps, ptr; | 1136 | int len, ws, ps, ptr; |
1137 | unsigned char op; | 1137 | unsigned char op; |
1138 | atom_exec_context ectx; | 1138 | atom_exec_context ectx; |
1139 | int ret = 0; | ||
1139 | 1140 | ||
1140 | if (!base) | 1141 | if (!base) |
1141 | return -EINVAL; | 1142 | return -EINVAL; |
@@ -1168,7 +1169,8 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 | |||
1168 | if (ectx.abort) { | 1169 | if (ectx.abort) { |
1169 | DRM_ERROR("atombios stuck executing %04X (len %d, WS %d, PS %d) @ 0x%04X\n", | 1170 | DRM_ERROR("atombios stuck executing %04X (len %d, WS %d, PS %d) @ 0x%04X\n", |
1170 | base, len, ws, ps, ptr - 1); | 1171 | base, len, ws, ps, ptr - 1); |
1171 | return -EINVAL; | 1172 | ret = -EINVAL; |
1173 | goto free; | ||
1172 | } | 1174 | } |
1173 | 1175 | ||
1174 | if (op < ATOM_OP_CNT && op > 0) | 1176 | if (op < ATOM_OP_CNT && op > 0) |
@@ -1183,9 +1185,10 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 | |||
1183 | debug_depth--; | 1185 | debug_depth--; |
1184 | SDEBUG("<<\n"); | 1186 | SDEBUG("<<\n"); |
1185 | 1187 | ||
1188 | free: | ||
1186 | if (ws) | 1189 | if (ws) |
1187 | kfree(ectx.ws); | 1190 | kfree(ectx.ws); |
1188 | return 0; | 1191 | return ret; |
1189 | } | 1192 | } |
1190 | 1193 | ||
1191 | int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) | 1194 | int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) |