From 10f01feb982ef35fc0905fb1d2d18f4bd9a37331 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 20 Apr 2016 04:34:43 +0000 Subject: [PATCH] Follow-up for the previous commit git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6866 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_copy_mgr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index f2b7eb476..62fdb781a 100644 --- a/scst/src/scst_copy_mgr.c +++ b/scst/src/scst_copy_mgr.c @@ -2535,9 +2535,13 @@ static int scst_cm_dev_register(struct scst_device *dev, uint64_t lun) list_for_each_entry(tgt_dev, head, sess_tgt_dev_list_entry) { if (tgt_dev->dev == dev) { + /* + * It's OK, because the copy manager could + * auto register some devices + */ TRACE_DBG("Copy Manager already registered " "device %s", dev->virt_name); - res = -EEXIST; + res = 0; goto out; } }