libnvdimm: IS_ERR() usage cleanup
authorDan Williams <dan.j.williams@intel.com>
Fri, 27 May 2016 20:28:31 +0000 (13:28 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 17 Jun 2016 23:23:23 +0000 (16:23 -0700)
commit42588958147c7cc5a68726f14579011ad96663bb
treeee67e2dfa93650c6f16ba83145d056f45767d8b3
parent0aefa05420c0e81eec2496b28a1b5d6e7783cb23
libnvdimm: IS_ERR() usage cleanup

Prompted by commit 287980e49ffc "remove lots of IS_ERR_VALUE abuses", I
ran make coccicheck against drivers/nvdimm/ and found that:

if (IS_ERR(x))
return PTR_ERR(x);
return 0;

...can be replaced with PTR_ERR_OR_ZERO().

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/bus.c
drivers/nvdimm/claim.c