Commit 2cb98d01 authored by Markus Elfring's avatar Markus Elfring Committed by Takashi Iwai

ALSA: rme96: Adjust five checks for null pointers

The script “checkpatch.pl” pointed information out like the following.

Comparison to NULL could be written …

Thus fix the affected source code places.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d72a8010
......@@ -1199,7 +1199,7 @@ snd_rme96_playback_spdif_open(struct snd_pcm_substream *substream)
snd_pcm_set_sync(substream);
spin_lock_irq(&rme96->lock);
if (rme96->playback_substream != NULL) {
if (rme96->playback_substream) {
spin_unlock_irq(&rme96->lock);
return -EBUSY;
}
......@@ -1248,7 +1248,7 @@ snd_rme96_capture_spdif_open(struct snd_pcm_substream *substream)
}
spin_lock_irq(&rme96->lock);
if (rme96->capture_substream != NULL) {
if (rme96->capture_substream) {
spin_unlock_irq(&rme96->lock);
return -EBUSY;
}
......@@ -1268,7 +1268,7 @@ snd_rme96_playback_adat_open(struct snd_pcm_substream *substream)
snd_pcm_set_sync(substream);
spin_lock_irq(&rme96->lock);
if (rme96->playback_substream != NULL) {
if (rme96->playback_substream) {
spin_unlock_irq(&rme96->lock);
return -EBUSY;
}
......@@ -1315,7 +1315,7 @@ snd_rme96_capture_adat_open(struct snd_pcm_substream *substream)
}
spin_lock_irq(&rme96->lock);
if (rme96->capture_substream != NULL) {
if (rme96->capture_substream) {
spin_unlock_irq(&rme96->lock);
return -EBUSY;
}
......@@ -1578,9 +1578,9 @@ snd_rme96_free(void *private_data)
{
struct rme96 *rme96 = (struct rme96 *)private_data;
if (rme96 == NULL) {
if (!rme96)
return;
}
if (rme96->irq >= 0) {
snd_rme96_trigger(rme96, RME96_STOP_BOTH);
rme96->areg &= ~RME96_AR_DAC_EN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment