34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From 44ce9bbdbf38e6d090016ef9fd8a8b9063f4821e Mon Sep 17 00:00:00 2001
|
|
From: Jens Osterkamp <jens@linux.vnet.ibm.com>
|
|
Date: Sun, 6 Mar 2011 21:37:50 -0800
|
|
Subject: [PATCH 11/51] no error if the profile already exists
|
|
|
|
In case we receive a profile for addition that already exists, there is no
|
|
need to return NULL to indicate an error. This may have just been a
|
|
duplicate request or the profile already existed e.g. if libvirt has been
|
|
restarted.
|
|
|
|
Signed-off-by: Jens Osterkamp <jens@linux.vnet.ibm.com>
|
|
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
|
|
Signed-off-by: Petr Sabata <psabata@redhat.com>
|
|
---
|
|
lldp_vdp.c | 2 +-
|
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/lldp_vdp.c b/lldp_vdp.c
|
|
index a3781b0..73ca59f 100644
|
|
--- a/lldp_vdp.c
|
|
+++ b/lldp_vdp.c
|
|
@@ -1108,7 +1108,7 @@ struct vsi_profile *vdp_add_profile(struct vsi_profile *profile)
|
|
if (p->mode == profile->mode) {
|
|
LLDPAD_DBG("%s(%i): profile already exists, ignoring !\n",
|
|
__func__, __LINE__);
|
|
- return NULL;
|
|
+ return p;
|
|
} else {
|
|
LLDPAD_DBG("%s(%i): taking new mode !\n", __func__,
|
|
__LINE__);
|
|
--
|
|
1.7.4.4
|
|
|