From df5275234907f7be59076c0e91b1b5d0e55f9450 Mon Sep 17 00:00:00 2001 From: Hoernchen Date: Mon, 21 May 2012 22:36:45 +0200 Subject: [PATCH] tuner_e4k: fix returncode of e4k_set_enh_gain() Signed-off-by: Steve Markgraf --- src/tuner_e4k.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tuner_e4k.c b/src/tuner_e4k.c index 1801f63..c41f5a2 100644 --- a/src/tuner_e4k.c +++ b/src/tuner_e4k.c @@ -668,7 +668,12 @@ int e4k_set_enh_gain(struct e4k_state *e4k, int32_t gain) } } e4k_reg_set_mask(e4k, E4K_REG_AGC11, 0x7, 0); - return 0; + + /* special case: 0 = off*/ + if(0 == gain) + return 0; + else + return -EINVAL; } int e4k_enable_manual_gain(struct e4k_state *e4k, uint8_t manual)