From c4ae51ffae0d3c0a0cbc8e91b4e971631f39a3e1 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 4 Oct 2010 17:20:47 +0000 Subject: [PATCH] dahdi: 'if (chan)' -> 'if (!chan)' in dahdi_ioctl_getgains. Fixes a typo recently introduced that was preventing asterisk from setting the swgains on a channel. Signed-off-by: Shaun Ruffell git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9423 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 4c909e5..f2b675d 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -3624,7 +3624,7 @@ static int dahdi_ioctl_getgains(struct file *file, unsigned long data) } chan = (!gain->chan) ? chan_from_file(file) : chan_from_num(gain->chan); - if (chan) { + if (!chan) { res = -EINVAL; goto cleanup; }