Selaa lähdekoodia

Merge "asoc: codecs: Add default case for switch."

qctecmdr 4 vuotta sitten
vanhempi
sitoutus
072e3e291c
1 muutettua tiedostoa jossa 8 lisäystä ja 0 poistoa
  1. 8 0
      asoc/codecs/wcd937x/wcd937x.c

+ 8 - 0
asoc/codecs/wcd937x/wcd937x.c

@@ -164,6 +164,10 @@ static int wcd937x_set_port_params(struct snd_soc_component *component,
 		map = &wcd937x->tx_port_mapping;
 		num_ports = wcd937x->num_tx_ports;
 		break;
+	default:
+		dev_err(component->dev, "%s Invalid path selected %u\n",
+					__func__, path);
+		return -EINVAL;
 	}
 
 	for (i = 0; i <= num_ports; i++) {
@@ -208,6 +212,10 @@ static int wcd937x_parse_port_mapping(struct device *dev,
 		map = &wcd937x->tx_port_mapping;
 		num_ports = &wcd937x->num_tx_ports;
 		break;
+	default:
+		dev_err(dev, "%s Invalid path selected %u\n",
+				 __func__, path);
+		return -EINVAL;
 	}
 
 	if (!of_find_property(dev->of_node, prop,