Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: codecs: minor cppcheck cleanups

Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Small number of cleanups that were either missed in previous versions
or detected by new cppcheck version.

+4 -10
-4
sound/soc/codecs/hdmi-codec.c
··· 20 20 21 21 #define HDMI_CODEC_CHMAP_IDX_UNKNOWN -1 22 22 23 - struct hdmi_codec_channel_map_table { 24 - unsigned char map; /* ALSA API channel map position */ 25 - }; 26 - 27 23 /* 28 24 * CEA speaker placement for HDMI 1.4: 29 25 *
+1 -1
sound/soc/codecs/wcd-mbhc-v2.c
··· 1189 1189 pt_gnd_mic_swap_cnt = 0; 1190 1190 plug_type = wcd_mbhc_get_plug_from_adc(mbhc, output_mv); 1191 1191 continue; 1192 - } else if (cross_conn < 0) /* Error */ 1192 + } else /* Error if (cross_conn < 0) */ 1193 1193 continue; 1194 1194 1195 1195 if (pt_gnd_mic_swap_cnt == GND_MIC_SWAP_THRESHOLD) {
+1 -3
sound/soc/codecs/wcd9335.c
··· 1821 1821 tx_port_reg = WCD9335_CDC_IF_ROUTER_TX_MUX_CFG3; 1822 1822 shift = 0; 1823 1823 shift_val = 0x0F; 1824 - } else if (tx_port == 13) { 1824 + } else /* (tx_port == 13) */ { 1825 1825 tx_port_reg = WCD9335_CDC_IF_ROUTER_TX_MUX_CFG3; 1826 1826 shift = 4; 1827 1827 shift_val = 0x03; 1828 - } else { 1829 - return -EINVAL; 1830 1828 } 1831 1829 1832 1830 tx_mux_sel = snd_soc_component_read(comp, tx_port_reg) &
+1 -1
sound/soc/fsl/fsl_utils.c
··· 124 124 { 125 125 struct clk *p, *pll = NULL, *npll = NULL; 126 126 bool reparent = false; 127 - int ret = 0; 127 + int ret; 128 128 129 129 if (!clk || !pll8k_clk || !pll11k_clk) 130 130 return;
+1 -1
sound/soc/ti/omap-mcbsp.c
··· 614 614 { 615 615 struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev); 616 616 struct resource *res; 617 - int ret = 0; 617 + int ret; 618 618 619 619 spin_lock_init(&mcbsp->lock); 620 620 mcbsp->free = true;