From patchwork Thu Feb 28 02:57:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 223762 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 35F822C0086 for ; Thu, 28 Feb 2013 13:57:58 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751991Ab3B1C5z (ORCPT ); Wed, 27 Feb 2013 21:57:55 -0500 Received: from intranet.asianux.com ([58.214.24.6]:15701 "EHLO intranet.asianux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751190Ab3B1C5x (ORCPT ); Wed, 27 Feb 2013 21:57:53 -0500 Received: by intranet.asianux.com (Postfix, from userid 103) id 964691840247; Thu, 28 Feb 2013 10:57:50 +0800 (CST) X-Spam-Score: -100.8 X-Spam-Checker-Version: SpamAssassin 3.1.9 (2007-02-13) on intranet.asianux.com X-Spam-Level: X-Spam-Status: No, score=-100.8 required=5.0 tests=AWL,BAYES_00, RATWARE_GECKO_BUILD,USER_IN_WHITELIST autolearn=no version=3.1.9 Received: from [10.1.0.143] (unknown [219.143.36.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by intranet.asianux.com (Postfix) with ESMTP id EA6001840247; Thu, 28 Feb 2013 10:57:49 +0800 (CST) Message-ID: <512EC79C.3010700@asianux.com> Date: Thu, 28 Feb 2013 10:57:32 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Jiri Slaby CC: Jiri Kosina , isdn@linux-pingi.de, Greg KH , Alan Cox , netdev Subject: [PATCH] drivers/isdn: break out of the loop after call isdn_tty_send_msg References: <512DD2B3.2070404@asianux.com> <512DD94C.2020008@suse.cz> In-Reply-To: <512DD94C.2020008@suse.cz> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org need break out of the loop after call isdn_tty_send_msg. isdn_tty_send_msg is intended to eat the rest of the string. so need not scan again the string which appended "+M...". Signed-off-by: Chen Gang --- drivers/isdn/i4l/isdn_tty.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index d8a7d83..8ac7b33 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c @@ -3587,7 +3587,7 @@ isdn_tty_parse_at(modem_info *info) case 'M': /* MESSAGE */ p++; isdn_tty_send_msg(info, m, p); - break; + goto tail; default: PARSE_ERROR; } @@ -3601,6 +3601,8 @@ isdn_tty_parse_at(modem_info *info) PARSE_ERROR; } } + +tail: #ifdef CONFIG_ISDN_AUDIO if (!info->vonline) #endif