diff options
Diffstat (limited to 'drivers/android/binder_alloc.c')
-rw-r--r-- | drivers/android/binder_alloc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c index 0dba2308125c..fdf9d9f12aac 100644 --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c | |||
@@ -1006,8 +1006,14 @@ void binder_alloc_init(struct binder_alloc *alloc) | |||
1006 | INIT_LIST_HEAD(&alloc->buffers); | 1006 | INIT_LIST_HEAD(&alloc->buffers); |
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | void binder_alloc_shrinker_init(void) | 1009 | int binder_alloc_shrinker_init(void) |
1010 | { | 1010 | { |
1011 | list_lru_init(&binder_alloc_lru); | 1011 | int ret = list_lru_init(&binder_alloc_lru); |
1012 | register_shrinker(&binder_shrinker); | 1012 | |
1013 | if (ret == 0) { | ||
1014 | ret = register_shrinker(&binder_shrinker); | ||
1015 | if (ret) | ||
1016 | list_lru_destroy(&binder_alloc_lru); | ||
1017 | } | ||
1018 | return ret; | ||
1013 | } | 1019 | } |