msm: bam_dmux: Update error logging
Update error logging to aid in debugging.
Change-Id: I961afa9392f435b1fb6203505cb7af5a905f7011
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
diff --git a/arch/arm/mach-msm/bam_dmux.c b/arch/arm/mach-msm/bam_dmux.c
index d82a6bf..cb0406f 100644
--- a/arch/arm/mach-msm/bam_dmux.c
+++ b/arch/arm/mach-msm/bam_dmux.c
@@ -523,12 +523,18 @@
int rc = 0;
DBG("%s: opening ch %d\n", __func__, id);
- if (!bam_mux_initialized)
+ if (!bam_mux_initialized) {
+ DBG("%s: not inititialized\n", __func__);
return -ENODEV;
- if (id >= BAM_DMUX_NUM_CHANNELS)
+ }
+ if (id >= BAM_DMUX_NUM_CHANNELS) {
+ pr_err("%s: invalid channel id %d\n", __func__, id);
return -EINVAL;
- if (notify == NULL)
+ }
+ if (notify == NULL) {
+ pr_err("%s: notify function is NULL\n", __func__);
return -EINVAL;
+ }
hdr = kmalloc(sizeof(struct bam_mux_hdr), GFP_KERNEL);
if (hdr == NULL) {
@@ -546,8 +552,7 @@
DBG("%s: Remote not open; ch: %d\n", __func__, id);
spin_unlock_irqrestore(&bam_ch[id].lock, flags);
kfree(hdr);
- rc = -ENODEV;
- goto open_done;
+ return -ENODEV;
}
bam_ch[id].notify = notify;