ASoC: omap-mcbsp: No need to initialize max_xx_thres when it is not used
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 8 Nov 2018 07:30:00 +0000 (09:30 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 13 Nov 2018 17:50:32 +0000 (09:50 -0800)
Initializing to -EINVAL is not correct as the variables are unsigned and
if buffer_size is 0 then they are not used anyway.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/omap/omap-mcbsp.c

index 8cab115..e0ef477 100644 (file)
@@ -727,9 +727,6 @@ static int omap_mcbsp_init(struct platform_device *pdev)
                                "Unable to create additional controls\n");
                        goto err_thres;
                }
-       } else {
-               mcbsp->max_tx_thres = -EINVAL;
-               mcbsp->max_rx_thres = -EINVAL;
        }
 
        ret = omap_mcbsp_st_init(pdev);