Skip to content

Commit

Permalink
ASoC: omap: mcbsp: Remove redundant checks for the st_data pointer
Browse files Browse the repository at this point in the history
The parent functions of omap_st_start/stop also checks the validity of the
st_data pointer so we do not need to do it again inside of omap_st_start/stop

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
  • Loading branch information
Peter Ujfalusi authored and Liam Girdwood committed Mar 12, 2012
1 parent e2002ab commit 58db1dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/omap/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static int omap_st_start(struct omap_mcbsp *mcbsp)
{
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;

if (st_data && st_data->enabled && !st_data->running) {
if (st_data->enabled && !st_data->running) {
omap_st_fir_write(mcbsp, st_data->taps);
omap_st_chgain(mcbsp);

Expand Down Expand Up @@ -350,7 +350,7 @@ static int omap_st_stop(struct omap_mcbsp *mcbsp)
{
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;

if (st_data && st_data->running) {
if (st_data->running) {
if (!mcbsp->free) {
omap_st_off(mcbsp);
st_data->running = 0;
Expand Down

0 comments on commit 58db1dc

Please sign in to comment.