From 1ad49823141df2b1b9847ca68dc316c0ffe0b060 Mon Sep 17 00:00:00 2001 From: Yan He Date: Mon, 26 Mar 2012 17:10:24 -0700 Subject: [PATCH] platform-drivers: msm: sps: fix an error in pipe assignment When set up a new pipe but the resource for that pipe is already in use, we should return error directly instead of first disabling that pipe in BAM HW. CRs-Fixed: 341066 Signed-off-by: Yan He --- drivers/platform/msm/sps/sps_bam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/msm/sps/sps_bam.c b/drivers/platform/msm/sps/sps_bam.c index e48f59b38e0..b5192d1c5c1 100644 --- a/drivers/platform/msm/sps/sps_bam.c +++ b/drivers/platform/msm/sps/sps_bam.c @@ -802,13 +802,13 @@ int sps_bam_pipe_connect(struct sps_pipe *bam_pipe, if (dev->pipes[pipe_index] != BAM_PIPE_UNASSIGNED) { SPS_ERR("sps:Invalid pipe %d on BAM 0x%x for connect", pipe_index, BAM_ID(dev)); - goto exit_err; + return SPS_ERROR; } if (bam_pipe_is_enabled(dev->base, pipe_index)) { SPS_ERR("sps:BAM 0x%x pipe %d sharing violation", BAM_ID(dev), pipe_index); - goto exit_err; + return SPS_ERROR; } if (bam_pipe_init(dev->base, pipe_index, &hw_params, dev->props.ee)) {