Commit 5effdf70 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: mite: (!foo) preferred over (foo == NULL)



Also, clarify the 'ring' allocation failure by returning NULL instead
of 'ring' (which would be NULL).

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 854472c2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -186,10 +186,10 @@ struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite_struct *mite)
	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;
	}