int n = hdspm->period_bytes;
void *buf = hdspm->playback_buffer;
- if (buf == NULL)
+ if (!buf)
return;
for (i = 0; i < HDSPM_MAX_CHANNELS; i++) {
break;
}
- if (NULL != list) {
+ if (list) {
for (idx = 0; idx < limit; idx++) {
err = snd_ctl_add(card,
snd_ctl_new1(&list[idx], hdspm));
snd_hdspm_capture_subinfo;
if (playback) {
- if (hdspm->capture_substream == NULL)
+ if (!hdspm->capture_substream)
hdspm_stop_audio(hdspm);
hdspm->playback_pid = current->pid;
hdspm->playback_substream = substream;
} else {
- if (hdspm->playback_substream == NULL)
+ if (!hdspm->playback_substream)
hdspm_stop_audio(hdspm);
hdspm->capture_pid = current->pid;
HDSPM_s2_tco_detect) {
hdspm->midiPorts++;
hdspm->tco = kzalloc(sizeof(*hdspm->tco), GFP_KERNEL);
- if (NULL != hdspm->tco) {
+ if (hdspm->tco)
hdspm_tco_write(hdspm);
- }
+
dev_info(card->dev, "AIO/RayDAT TCO module found\n");
} else {
hdspm->tco = NULL;
if (hdspm_read(hdspm, HDSPM_statusRegister) & HDSPM_tco_detect) {
hdspm->midiPorts++;
hdspm->tco = kzalloc(sizeof(*hdspm->tco), GFP_KERNEL);
- if (NULL != hdspm->tco) {
+ if (hdspm->tco)
hdspm_tco_write(hdspm);
- }
+
dev_info(card->dev, "MADI/AES TCO module found\n");
} else {
hdspm->tco = NULL;
* this case, we don't set card->id to avoid collisions
* when running with multiple cards.
*/
- if (NULL == id[hdspm->dev] && hdspm->serial != 0xFFFFFF) {
+ if (!id[hdspm->dev] && hdspm->serial != 0xFFFFFF) {
snprintf(card->id, sizeof(card->id),
"HDSPMx%06x", hdspm->serial);
snd_card_set_id(card, card->id);