aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/tuner-i2c.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/tuner-i2c.h b/drivers/media/video/tuner-i2c.h
index 8ec5b41d459..c53c327a487 100644
--- a/drivers/media/video/tuner-i2c.h
+++ b/drivers/media/video/tuner-i2c.h
@@ -155,13 +155,17 @@ __fail: \
__ret; \
})
-#define hybrid_tuner_release_state(state) do { \
+#define hybrid_tuner_release_state(state) \
+({ \
+ int __ret; \
state->i2c_props.count--; \
+ __ret = state->i2c_props.count; \
if (!state->i2c_props.count) { \
__tuner_info(state->i2c_props, "destroying instance\n");\
list_del(&state->hybrid_tuner_instance_list); \
kfree(state); \
} \
-} while (0)
+ __ret; \
+})
#endif /* __TUNER_I2C_H__ */