]> git.baikalelectronics.ru Git - kernel.git/commit
dm: fix alloc_dax error handling in alloc_dev
authorChristoph Hellwig <hch@lst.de>
Mon, 29 Nov 2021 10:21:35 +0000 (11:21 +0100)
committerDan Williams <dan.j.williams@intel.com>
Sat, 4 Dec 2021 16:58:50 +0000 (08:58 -0800)
commitc29f7d67ae87aa54c9a94624f276a3c0f78f9130
tree1797097e46f8a221f63d5c044ad0fc26574cad70
parent32148911b1d6fe9f29ac292685061f226de0134e
dm: fix alloc_dax error handling in alloc_dev

Make sure ->dax_dev is NULL on error so that the cleanup path doesn't
trip over an ERR_PTR.

Reported-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211129102203.2243509-2-hch@lst.de
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/md/dm.c