* [patch] Staging: bcm2835-audio: remove unneeded NULL check
@ 2017-02-07 13:17 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2017-02-07 13:17 UTC (permalink / raw)
To: kernel-janitors
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>
diff --git a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
index b7922be4909c..6578246b0f08 100644
--- a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
+++ b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
@@ -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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-07 13:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-07 13:17 [patch] Staging: bcm2835-audio: remove unneeded NULL check Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).