Commit 1e7b5812 authored by Daniel Vetter's avatar Daniel Vetter

Merge tag 'drm-misc-fixes-2021-07-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

Short summary of fixes pull:

 * dma-buf: Fix fence leak in sync_file_merge() error code
 * drm/panel: nt35510: Don't fail on DSI reads
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/YO07pEfweKVO+7y0@linux-uq9g
parents e73f0f0e ffe00021
...@@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a, ...@@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
struct sync_file *b) struct sync_file *b)
{ {
struct sync_file *sync_file; struct sync_file *sync_file;
struct dma_fence **fences, **nfences, **a_fences, **b_fences; struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
int i, i_a, i_b, num_fences, a_num_fences, b_num_fences; int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
sync_file = sync_file_alloc(); sync_file = sync_file_alloc();
if (!sync_file) if (!sync_file)
...@@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a, ...@@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
* If a sync_file can only be created with sync_file_merge * If a sync_file can only be created with sync_file_merge
* and sync_file_create, this is a reasonable assumption. * and sync_file_create, this is a reasonable assumption.
*/ */
for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) { for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
struct dma_fence *pt_a = a_fences[i_a]; struct dma_fence *pt_a = a_fences[i_a];
struct dma_fence *pt_b = b_fences[i_b]; struct dma_fence *pt_b = b_fences[i_b];
...@@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a, ...@@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
fences = nfences; fences = nfences;
} }
if (sync_file_set_fence(sync_file, fences, i) < 0) { if (sync_file_set_fence(sync_file, fences, i) < 0)
kfree(fences);
goto err; goto err;
}
strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name)); strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
return sync_file; return sync_file;
err: err:
while (i)
dma_fence_put(fences[--i]);
kfree(fences);
fput(sync_file->file); fput(sync_file->file);
return NULL; return NULL;
......
...@@ -706,9 +706,7 @@ static int nt35510_power_on(struct nt35510 *nt) ...@@ -706,9 +706,7 @@ static int nt35510_power_on(struct nt35510 *nt)
if (ret) if (ret)
return ret; return ret;
ret = nt35510_read_id(nt); nt35510_read_id(nt);
if (ret)
return ret;
/* Set up stuff in manufacturer control, page 1 */ /* Set up stuff in manufacturer control, page 1 */
ret = nt35510_send_long(nt, dsi, MCS_CMD_MAUCCTR, ret = nt35510_send_long(nt, dsi, MCS_CMD_MAUCCTR,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment