]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/mbcache.c
arm64: defconfig: Enable DRM DU and V4L2 FCP + VSP modules
[karo-tx-linux.git] / fs / mbcache.c
index eccda3a02de6ff6a914b1636d5e80da0557eadde..c5bd19ffa326a1c8c30dc7d89263640d0aa82739 100644 (file)
@@ -366,7 +366,11 @@ struct mb_cache *mb_cache_create(int bucket_bits)
        cache->c_shrink.count_objects = mb_cache_count;
        cache->c_shrink.scan_objects = mb_cache_scan;
        cache->c_shrink.seeks = DEFAULT_SEEKS;
-       register_shrinker(&cache->c_shrink);
+       if (register_shrinker(&cache->c_shrink)) {
+               kfree(cache->c_hash);
+               kfree(cache);
+               goto err_out;
+       }
 
        INIT_WORK(&cache->c_shrink_work, mb_cache_shrink_worker);