Staging: bcm2835-audio: remove unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 7 Feb 2017 13:17:57 +0000 (16:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2017 12:16:45 +0000 (13:16 +0100)
We just dereferenced "instance" on the line before so checking it here
is pointless.  Anyway, it can't be NULL here so let's remove the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm2835-audio/bcm2835-vchiq.c

index b7922be..6578246 100644 (file)
@@ -775,10 +775,9 @@ unlock:
        mutex_unlock(&instance->vchi_mutex);
 
        /* Stop the audio service */
-       if (instance) {
-               vc_vchi_audio_deinit(instance);
-               alsa_stream->instance = NULL;
-       }
+       vc_vchi_audio_deinit(instance);
+       alsa_stream->instance = NULL;
+
        LOG_DBG(" .. OUT\n");
        return ret;
 }