ceph: improve error handling in ceph_mdsmap_decode
authorEmil Goode <emilgoode@gmail.com>
Tue, 28 May 2013 14:59:00 +0000 (16:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:24:24 +0000 (12:24 -0800)
commitf1b6559cfa8c280249b52112223459b00dcdb6e9
treeee23ea569316f9fadaba6dcee95935b68d94c102
parent3da8d9a6ae084d013bfe1b47c319380a91c7012a
ceph: improve error handling in ceph_mdsmap_decode

commit c213b50b7dcbf06abcfbf1e4eee5b76586718bd9 upstream.

This patch makes the following improvements to the error handling
in the ceph_mdsmap_decode function:

- Add a NULL check for return value from kcalloc
- Make use of the variable err

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/mdsmap.c