]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/tuner-core.c
V4L/DVB (7800): tuner_symbol_probe(): don't do symbol_put() if symbol_request() failed
[linux-2.6-omap-h63xx.git] / drivers / media / video / tuner-core.c
index cc19c4abb467901d741c58b3aea4f1ca2fa46a9c..c8cd718675abf30c67ca7972e2b6155d750a95f7 100644 (file)
 #define PREFIX t->i2c->driver->driver.name
 
 /** This macro allows us to probe dynamically, avoiding static links */
-#ifdef CONFIG_DVB_CORE_ATTACH
+#ifdef CONFIG_MEDIA_ATTACH
 #define tuner_symbol_probe(FUNCTION, ARGS...) ({ \
        int __r = -EINVAL; \
        typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
        if (__a) { \
                __r = (int) __a(ARGS); \
+               symbol_put(FUNCTION); \
        } else { \
                printk(KERN_ERR "TUNER: Unable to find " \
                                "symbol "#FUNCTION"()\n"); \
        } \
-       symbol_put(FUNCTION); \
        __r; \
 })