]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/via: Remove unecessary NULL check
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 5 Apr 2014 08:19:55 +0000 (10:19 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 22 Apr 2014 13:39:11 +0000 (15:39 +0200)
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>
drivers/gpu/drm/via/via_mm.c

index 9278891054834992ba30c5b9ac2a4f5b09403438..d70b1e1544bf68f7d99c1c756d00080f435e0815 100644 (file)
@@ -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);