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; }