summaryrefslogtreecommitdiff
path: root/drivers/android/binder.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2017-11-29 16:29:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-18 17:59:17 +0300
commit533dfb250d1c8d2bb8c9b65252f7b296b29913d4 (patch)
tree3e18255457cf2d693e5f984dcb0ebdeb3c79892b /drivers/android/binder.c
parent22ec1a2aea73b9dfe340dff7945bd85af4cc6280 (diff)
downloadlinux-533dfb250d1c8d2bb8c9b65252f7b296b29913d4.tar.xz
android: binder: Check for errors in binder_alloc_shrinker_init().
Both list_lru_init() and register_shrinker() might return an error. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Sherry Yang <sherryy@android.com> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android/binder.c')
-rw-r--r--drivers/android/binder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 85b0bb497759..a54a0f1f69a9 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -5569,7 +5569,9 @@ static int __init binder_init(void)
struct binder_device *device;
struct hlist_node *tmp;
- binder_alloc_shrinker_init();
+ ret = binder_alloc_shrinker_init();
+ if (ret)
+ return ret;
atomic_set(&binder_transaction_log.cur, ~0U);
atomic_set(&binder_transaction_log_failed.cur, ~0U);