diff options
| author | Gou Hao <gouhao@uniontech.com> | 2026-07-24 10:28:49 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-07-26 22:51:14 -0700 |
| commit | 7276b0817c35ea4ae4d089c8c780a95bcfbbbdc5 (patch) | |
| tree | f9d4d3c2b8b8452b12c1c1dd530e4d412b556caa /drivers/gpu | |
| parent | 45ff8ac34377e0128daa95ec9b30eb8f8cfa2ea5 (diff) | |
| download | linux-next-7276b0817c35ea4ae4d089c8c780a95bcfbbbdc5.tar.gz linux-next-7276b0817c35ea4ae4d089c8c780a95bcfbbbdc5.zip | |
drm: remove dead WARN_ON NULL check after GFP_NOFAIL allocation
kzalloc_obj with the __GFP_NOFAIL flag will never return NULL, so the
subsequent WARN_ON(!ctx) is unreachable dead code. Remove it.
Link: https://lore.kernel.org/20260724022851.466017-5-gouhao@uniontech.com
Signed-off-by: Gou Hao <gouhao@uniontech.com>
Cc: Bharat Potnuri <bharat@chelsio.com>
Cc: Cédric Le Goater <clg@kaod.org>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: jiazhenyuan <jiazhenyuan@uniontech.com>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nam Cao <namcao@linutronix.de>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Nilay Shroff <nilay@linux.ibm.com>
Cc: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: Thomas Zimemrmann <tzimmermann@suse.de>
Cc: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/drm_modeset_lock.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c index 2c806b0146d6..e14814c30d8c 100644 --- a/drivers/gpu/drm/drm_modeset_lock.c +++ b/drivers/gpu/drm/drm_modeset_lock.c @@ -149,11 +149,7 @@ void drm_modeset_lock_all(struct drm_device *dev) int ret; ctx = kzalloc_obj(*ctx, GFP_KERNEL | __GFP_NOFAIL); - if (WARN_ON(!ctx)) - return; - mutex_lock(&config->mutex); - drm_modeset_acquire_init(ctx, 0); retry: |
