X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=mm%2Fslab.h;h=4d6d836247dd95c3eb5e4d3e39295a80eb000a81;hb=5fc40fd11d629a1bda71be5c5a7380723a021e97;hp=f96b49e4704efb1d362ef10c6eacef81afb9e6a0;hpb=407a0e18ecfbd7f58f49c307a657b63e6f32544d;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/mm/slab.h b/mm/slab.h index f96b49e4704e..4d6d836247dd 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -162,6 +162,8 @@ static inline const char *cache_name(struct kmem_cache *s) static inline struct kmem_cache *cache_from_memcg(struct kmem_cache *s, int idx) { + if (!s->memcg_params) + return NULL; return s->memcg_params->memcg_caches[idx]; }