Also, clarify the 'ring' allocation failure by returning NULL instead
of 'ring' (which would be NULL).
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        struct mite_dma_descriptor_ring *ring =
            kmalloc(sizeof(struct mite_dma_descriptor_ring), GFP_KERNEL);
 
-       if (ring == NULL)
-               return ring;
+       if (!ring)
+               return NULL;
        ring->hw_dev = get_device(&mite->pcidev->dev);
-       if (ring->hw_dev == NULL) {
+       if (!ring->hw_dev) {
                kfree(ring);
                return NULL;
        }