diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/atom.c')
-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 07b7ebf1f466..bcec2d79636e 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c | |||
@@ -1137,6 +1137,7 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 | |||
1137 | int len, ws, ps, ptr; | 1137 | int len, ws, ps, ptr; |
1138 | unsigned char op; | 1138 | unsigned char op; |
1139 | atom_exec_context ectx; | 1139 | atom_exec_context ectx; |
1140 | int ret = 0; | ||
1140 | 1141 | ||
1141 | if (!base) | 1142 | if (!base) |
1142 | return -EINVAL; | 1143 | return -EINVAL; |
@@ -1169,7 +1170,8 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 | |||
1169 | if (ectx.abort) { | 1170 | if (ectx.abort) { |
1170 | DRM_ERROR("atombios stuck executing %04X (len %d, WS %d, PS %d) @ 0x%04X\n", | 1171 | DRM_ERROR("atombios stuck executing %04X (len %d, WS %d, PS %d) @ 0x%04X\n", |
1171 | base, len, ws, ps, ptr - 1); | 1172 | base, len, ws, ps, ptr - 1); |
1172 | return -EINVAL; | 1173 | ret = -EINVAL; |
1174 | goto free; | ||
1173 | } | 1175 | } |
1174 | 1176 | ||
1175 | if (op < ATOM_OP_CNT && op > 0) | 1177 | if (op < ATOM_OP_CNT && op > 0) |
@@ -1184,9 +1186,10 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 | |||
1184 | debug_depth--; | 1186 | debug_depth--; |
1185 | SDEBUG("<<\n"); | 1187 | SDEBUG("<<\n"); |
1186 | 1188 | ||
1189 | free: | ||
1187 | if (ws) | 1190 | if (ws) |
1188 | kfree(ectx.ws); | 1191 | kfree(ectx.ws); |
1189 | return 0; | 1192 | return ret; |
1190 | } | 1193 | } |
1191 | 1194 | ||
1192 | int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) | 1195 | int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) |