Skip to content

Commit

Permalink
drm/via: Remove unecessary NULL check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Vetter committed Apr 22, 2014
1 parent 183c1a3 commit 2ffd652
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/via/via_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int via_final_context(struct drm_device *dev, int context)

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

0 comments on commit 2ffd652

Please sign in to comment.