cxl: Unlock on error in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 5 May 2017 05:34:58 +0000 (08:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:48:22 +0000 (19:48 +0200)
commit20c29d92ce653c216e1adb892bcb04846871d537
tree63f88bac62f7c984b83887a93132bc7f06a88331
parentf07ce2798efa11713d032513096f1912f2b1916f
cxl: Unlock on error in probe

[ Upstream commit 58d876fa7181f2f393190c1d32c056b5a9d34aa2 ]

We should unlock if get_cxl_adapter() fails.

Fixes: 594ff7d067ca ("cxl: Support to flash a new image on the adapter from a guest")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/cxl/flash.c