summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/i4l/isdn_tty.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-26 17:19:02 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-26 17:19:02 +0100
commite58b9a25eeb89ab2ee05cd093f6d7bc2f34acb21 (patch)
tree40162c796bc60f00d062b37718dc62adc970ac07 /drivers/isdn/i4l/isdn_tty.c
parentDrivers: hv: balloon: make local functions static (diff)
parentextcon: arizona: Fix interaction between headphone outputs and identification (diff)
downloadlinux-e58b9a25eeb89ab2ee05cd093f6d7bc2f34acb21.tar.xz
linux-e58b9a25eeb89ab2ee05cd093f6d7bc2f34acb21.zip
Merge tag 'arizona-extcon-asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into char-misc-next
Mark writes: ASoC/extcon: arizona: Fix interaction between HPDET and headphone outputs This patch series covers both ASoC and extcon subsystems and fixes an interaction between the HPDET function and the headphone outputs - we really shouldn't run HPDET while the headphone is active. The first patch is a refactoring to make the extcon side easier.
Diffstat (limited to 'drivers/isdn/i4l/isdn_tty.c')
-rw-r--r--drivers/isdn/i4l/isdn_tty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index d8a7d8323414..ebaebdf30f98 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -902,7 +902,9 @@ isdn_tty_send_msg(modem_info *info, atemu *m, char *msg)
int j;
int l;
- l = strlen(msg);
+ l = min(strlen(msg), sizeof(cmd.parm) - sizeof(cmd.parm.cmsg)
+ + sizeof(cmd.parm.cmsg.para) - 2);
+
if (!l) {
isdn_tty_modem_result(RESULT_ERROR, info);
return;