staging: bcm2835-audio: Rewrite comparison to NULL
authorSimon Sandström <simon@nikanor.nu>
Tue, 7 Feb 2017 11:02:43 +0000 (12:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2017 12:14:30 +0000 (13:14 +0100)
Fixes checkpatch check "Comparison to NULL could be written '!chip'".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm2835-audio/bcm2835.c

index de315a1..5bdc590 100644 (file)
@@ -61,7 +61,7 @@ static int snd_bcm2835_create(struct snd_card *card,
        *rchip = NULL;
 
        chip = kzalloc(sizeof(*chip), GFP_KERNEL);
-       if (chip == NULL)
+       if (!chip)
                return -ENOMEM;
 
        chip->card = card;