]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/trace/ftrace.c
Input: remove w90x900 keyboard driver
[linux.git] / kernel / trace / ftrace.c
index e77a6c92620f37e14c38cc0b4f77589d12130f66..576c41644e77cec3f8c18f8b04580320deec3f49 100644 (file)
@@ -4220,10 +4220,13 @@ void free_ftrace_func_mapper(struct ftrace_func_mapper *mapper,
        struct ftrace_func_entry *entry;
        struct ftrace_func_map *map;
        struct hlist_head *hhd;
-       int size = 1 << mapper->hash.size_bits;
-       int i;
+       int size, i;
+
+       if (!mapper)
+               return;
 
        if (free_func && mapper->hash.count) {
+               size = 1 << mapper->hash.size_bits;
                for (i = 0; i < size; i++) {
                        hhd = &mapper->hash.buckets[i];
                        hlist_for_each_entry(entry, hhd, hlist) {