Skip to contentSkip to conversation

Staging: bcm2835-audio: remove unneeded NULL check

PATCH New Dan Carpenter 1 participant 1 message Feb 7, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: bcm2835-audio: remove unneeded NULL check

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.

drivers/staging/bcm2835-audio/bcm2835-vchiq.c +3 -4
index b7922be4909c..6578246b0f08 100644
@@ -775,10 +775,9 @@ int bcm2835_audio_close(struct bcm2835_alsa_stream *alsa_stream)
 	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;
 }