ceph: handle kmalloc() failure

Return ERR_PTR(-ENOMEM) if kmalloc() fails. We handle allocation
failures the same way later in the function.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>

authored by Dan Carpenter and committed by Sage Weil 4736b009 9c423956

+2
+2
fs/ceph/mds_client.c
··· 328 328 struct ceph_mds_session *s; 329 329 330 330 s = kzalloc(sizeof(*s), GFP_NOFS); 331 + if (!s) 332 + return ERR_PTR(-ENOMEM); 331 333 s->s_mdsc = mdsc; 332 334 s->s_mds = mds; 333 335 s->s_state = CEPH_MDS_SESSION_NEW;