[PATCH] video: fbdev: sm501fb: Fix deallocation of buffers order

2021-04-07 Thread Aditya Pakki
The resource release in sm501fb_remove() is not in the inverse order of sm501fb_probe(), for the buffers. Release the info object after deallocating the buffers. Signed-off-by: Aditya Pakki --- drivers/video/fbdev/sm501fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] drm/noveau: fix reference count leak in nouveau_debugfs_strap_peek

2020-06-15 Thread Aditya Pakki
nouveau_debugfs_strap_peek() calls pm_runtime_get_sync() that increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH] omapfb: fix multiple reference count leaks due to pm_runtime_get_sync

2020-06-15 Thread Aditya Pakki
On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Aditya Pakki --- drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 7 +-- drivers/video/fbdev/omap2/omapfb/dss/dsi.c

[PATCH] drm/bridge: fix reference count leaks due to pm_runtime_get_sync()

2020-06-15 Thread Aditya Pakki
On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/bridge/cdns-dsi.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

[PATCH] drm/v3d: fix reference count leaks due to pm_runtime_get_sync

2020-06-15 Thread Aditya Pakki
On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/v3d/v3d_debugfs.c | 8 ++-- drivers/gpu/drm/v3d/v3d_drv.c | 4 +++- drivers

[PATCH] drm/nouveau: Fix reference count leak in nouveau_connector_detect

2020-06-15 Thread Aditya Pakki
nouveau_connector_detect() calls pm_runtime_get_sync and in turn increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/nouveau/nouveau_connector.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH] drm/radeon: fix multiple reference count leak

2020-06-15 Thread Aditya Pakki
On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/radeon/radeon_connectors.c | 20 +++- 1 file changed, 15 insertions

[PATCH] drm/noveau: fix reference count leak in nv50_disp_atomic_commit

2020-06-15 Thread Aditya Pakki
nv50_disp_atomic_commit() calls calls pm_runtime_get_sync and in turn increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH] drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync

2020-06-15 Thread Aditya Pakki
On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/radeon/radeon_display.c | 4 +++- drivers/gpu/drm/radeon/radeon_drv.c | 4

[PATCH] drm/nouveau: fix multiple instances of reference count leaks

2020-06-15 Thread Aditya Pakki
On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/nouveau/nouveau_drm.c | 8 ++-- drivers/gpu/drm/nouveau/nouveau_gem.c | 4 +++- 2 files

[PATCH] drm/noveau: fix reference count leak in nouveau_fbcon_open

2020-06-15 Thread Aditya Pakki
nouveau_fbcon_open() calls calls pm_runtime_get_sync() that increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

Re: [PATCH] drm/amd/display: replace BUG_ON with WARN_ON

2019-12-23 Thread Aditya Pakki
On 12/19/19 10:29 AM, Mikita Lipski wrote: > > > On 12/18/19 11:15 AM, Aditya Pakki wrote: >> In skip_modeset label within dm_update_crtc_state(), the dc stream >> cannot be NULL. Using BUG_ON as an assertion is not required and >> can be removed. The patch replac

[PATCH] drm/vmwgfx: remove unnecessary assertion in vmw_resource_alloc_id

2019-12-19 Thread Aditya Pakki
Every caller of vmw_resource_alloc_id checks if id is not -1. The assertion in the said function is thus redundant and can be removed. The patch removes the check. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH] drm/amd/display: replace BUG_ON with WARN_ON

2019-12-19 Thread Aditya Pakki
In skip_modeset label within dm_update_crtc_state(), the dc stream cannot be NULL. Using BUG_ON as an assertion is not required and can be removed. The patch replaces the check with a WARN_ON in case dm_new_crtc_state->stream is NULL. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/amd/disp

[PATCH] drm: remove duplicate check on parent and avoid BUG_ON

2019-12-16 Thread Aditya Pakki
In drm_dev_init, parent is checked for NULL via assert after checked in devm_drm_dev_init(). The patch removes the duplicate check and replaces the assertion with WARN_ON. Further, it returns -EINVAL consistent with the usage in devm_drm_dev_init. Signed-off-by: Aditya Pakki --- drivers/gpu/drm

[PATCH] drm/qxl: remove unnecessary BUG_ON check for handle

2019-12-06 Thread Aditya Pakki
In qxl_gem_object_create_with_handle(), handle's memory is not allocated on the heap. Checking for failure of handle via BUG_ON is unnecessary. This patch eliminates the check. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/qxl/qxl_gem.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH] drm/amd/display: Fix error returned by program_hpd_filter

2019-11-18 Thread Aditya Pakki
program_hpd_filter() currently fails to check for the errors returned in construct(). This patch returns error in case of failure. Signed-off-by: Aditya Pakki --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm

[PATCH] omapfb: Fix potential NULL pointer dereference in kmalloc

2019-03-03 Thread Aditya Pakki
Memory allocated, using kmalloc, for new_compat may fail. This patch checks for such an error and prevents potential NULL pointer dereference. Signed-off-by: Aditya Pakki --- drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

[PATCH] v2 bakclight: fix missing checks in ambient_light_zone_store

2019-01-07 Thread Aditya Pakki
In adp8870_bl_ambient_light_zone_store, set, clear, and write can return an error but are not checked. The fix adds a check for these cases and returns -1 to match the return type (ssize_t). Signed-off-by: Aditya Pakki --- drivers/video/backlight/adp8870_bl.c | 16 +--- 1 file