aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset/bas-gigaset.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/gigaset/bas-gigaset.c')
-rw-r--r--drivers/isdn/gigaset/bas-gigaset.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c
index 0ded3640b926..707d9c94cf9e 100644
--- a/drivers/isdn/gigaset/bas-gigaset.c
+++ b/drivers/isdn/gigaset/bas-gigaset.c
@@ -1914,11 +1914,13 @@ static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb)
1914 * The next command will reopen the AT channel automatically. 1914 * The next command will reopen the AT channel automatically.
1915 */ 1915 */
1916 if (cb->len == 3 && !memcmp(cb->buf, "+++", 3)) { 1916 if (cb->len == 3 && !memcmp(cb->buf, "+++", 3)) {
1917 kfree(cb);
1918 rc = req_submit(cs->bcs, HD_CLOSE_ATCHANNEL, 0, BAS_TIMEOUT); 1917 rc = req_submit(cs->bcs, HD_CLOSE_ATCHANNEL, 0, BAS_TIMEOUT);
1919 if (cb->wake_tasklet) 1918 if (cb->wake_tasklet)
1920 tasklet_schedule(cb->wake_tasklet); 1919 tasklet_schedule(cb->wake_tasklet);
1921 return rc < 0 ? rc : cb->len; 1920 if (!rc)
1921 rc = cb->len;
1922 kfree(cb);
1923 return rc;
1922 } 1924 }
1923 1925
1924 spin_lock_irqsave(&cs->cmdlock, flags); 1926 spin_lock_irqsave(&cs->cmdlock, flags);