mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
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 -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmDtO2QACgkQaA3BHVML eiPzfAgAw+jUC4fTJK1+tS7XZjvQZ3KLq9ElVJXdDOxCQE5SRciIqae147q9y3Yv 3T+A/mdwlyZOWVpTdmvWODBehpKe8kWmiH622mTWep2YpPyoxR5MWvS6efkXhC6W sWPV5Q/Bd7uCq5uI1p4NzWXajhcFrDY7nzJMGCMTT10YmvMRSgWMVL6E+H9iwBtP 9kMTdrySUtCPKB4yKLnLdy8cdR8aXzr9Gb45IQUCADBWdlDg6tei4V7ko1nx/Why jx00GF01pzWj+J1obdyixwWA6cQ+NmteXBL3vqDILsfW32mqBaoZejOUQsOErY4s +JkQp+TFrAZN+gaz86oIuvmQRPVNVg== =D86/ -----END PGP SIGNATURE----- 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: Daniel Vetter <daniel.vetter@ffwll.ch> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/YO07pEfweKVO+7y0@linux-uq9g
This commit is contained in:
commit
1e7b5812f4
@ -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 *sync_file;
|
||||
struct dma_fence **fences, **nfences, **a_fences, **b_fences;
|
||||
int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
|
||||
struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
|
||||
int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
|
||||
|
||||
sync_file = sync_file_alloc();
|
||||
if (!sync_file)
|
||||
@ -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
|
||||
* 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_b = b_fences[i_b];
|
||||
|
||||
@ -277,15 +277,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
|
||||
fences = nfences;
|
||||
}
|
||||
|
||||
if (sync_file_set_fence(sync_file, fences, i) < 0) {
|
||||
kfree(fences);
|
||||
if (sync_file_set_fence(sync_file, fences, i) < 0)
|
||||
goto err;
|
||||
}
|
||||
|
||||
strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
|
||||
return sync_file;
|
||||
|
||||
err:
|
||||
while (i)
|
||||
dma_fence_put(fences[--i]);
|
||||
kfree(fences);
|
||||
fput(sync_file->file);
|
||||
return NULL;
|
||||
|
||||
|
@ -706,9 +706,7 @@ static int nt35510_power_on(struct nt35510 *nt)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = nt35510_read_id(nt);
|
||||
if (ret)
|
||||
return ret;
|
||||
nt35510_read_id(nt);
|
||||
|
||||
/* Set up stuff in manufacturer control, page 1 */
|
||||
ret = nt35510_send_long(nt, dsi, MCS_CMD_MAUCCTR,
|
||||
|
Loading…
Reference in New Issue
Block a user