Skip to content

Commit 2ffd652

Browse files
committed
drm/via: Remove unecessary NULL check
The context_dtor callback is only called once we've successfully loaded the driver, which means dev->dev_private is set up. The check is hence pointless. Also dev->dev_private is deref already above, so compilers are free to elide it anyway. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 183c1a3 commit 2ffd652

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/gpu/drm/via/via_mm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ int via_final_context(struct drm_device *dev, int context)
7979

8080
/* Linux specific until context tracking code gets ported to BSD */
8181
/* Last context, perform cleanup */
82-
if (list_is_singular(&dev->ctxlist) && dev->dev_private) {
82+
if (list_is_singular(&dev->ctxlist)) {
8383
DRM_DEBUG("Last Context\n");
8484
drm_irq_uninstall(dev);
8585
via_cleanup_futex(dev_priv);

0 commit comments

Comments
 (0)