Commit 02df59d0 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: 6fire: Drop unnecessary NULL checks



The NULL checks of chip pointer in usb6fire_chip_abrt() and
usb6fire_card_free() are utterly useless, as it's guaranteed to be
non-NULL.  Drop them for increasing the readability.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260414132218.411013-5-tiwai@suse.de
parent 14101a06
Loading
Loading
Loading
Loading
+16 −20
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ static DEFINE_MUTEX(register_mutex);

static void usb6fire_chip_abort(struct sfire_chip *chip)
{
	if (chip) {
	if (chip->pcm)
		usb6fire_pcm_abort(chip);
	if (chip->midi)
@@ -53,13 +52,11 @@ static void usb6fire_chip_abort(struct sfire_chip *chip)
	if (chip->control)
		usb6fire_control_abort(chip);
}
}

static void usb6fire_card_free(struct snd_card *card)
{
	struct sfire_chip *chip = card->private_data;

	if (chip) {
	if (chip->pcm)
		usb6fire_pcm_destroy(chip);
	if (chip->midi)
@@ -69,7 +66,6 @@ static void usb6fire_card_free(struct snd_card *card)
	if (chip->control)
		usb6fire_control_destroy(chip);
}
}

static int usb6fire_chip_probe(struct usb_interface *intf,
			       const struct usb_device_id *usb_id)