aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/core/device.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index f8180cf1a004..4a9aa6d10c5e 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -183,18 +183,15 @@ static struct ib_device *__ib_device_get_by_name(const char *name)
int ib_device_rename(struct ib_device *ibdev, const char *name)
{
- struct ib_device *device;
int ret = 0;
if (!strcmp(name, dev_name(&ibdev->dev)))
return ret;
mutex_lock(&device_mutex);
- list_for_each_entry(device, &device_list, core_list) {
- if (!strcmp(name, dev_name(&device->dev))) {
- ret = -EEXIST;
- goto out;
- }
+ if (__ib_device_get_by_name(name)) {
+ ret = -EEXIST;
+ goto out;
}
ret = device_rename(&ibdev->dev, name);
62?s=13&d=retro' />Fam Zheng1-26/+32 2015-07-22AioContext: fix broken ctx->dispatching optimizationPaolo Bonzini1-18/+0 2015-07-22tests: remove irrelevant assertions from test-aioPaolo Bonzini1-4/+4 2015-06-12Revert "iothread: release iothread around aio_poll"Stefan Hajnoczi1-11/+8 2015-04-28iothread: release iothread around aio_pollPaolo Bonzini1-8/+11 2014-09-22async: aio_context_new(): Handle event_notifier_init failureChrysostomos Nanakos1-1/+9 2014-08-29test-aio: test timers on Windows tooPaolo Bonzini1-37/+11 2014-07-18tests: Add missing 'static' attributes (fix warnings from smatch)Stefan Weil1-1/+1 2014-07-14AioContext: do not rely on aio_poll(ctx, true) result to end a loopPaolo Bonzini1-12/+13 2014-07-09test-aio: fix GSource-based timer testPaolo Bonzini1-7/+6 2014-03-31tests: Remove unsupported tests for MinGWStefan Weil1-0/+16 2014-03-13aio: add aio_context_acquire() and aio_context_release()Stefan Hajnoczi1-0/+59 2013-12-06aio: make aio_poll(ctx, true) block with no fdsStefan Hajnoczi1-1/+0 2013-09-06aio / timers: fix build of test/test-aio.c on non-linux platformsAlex Bligh1-2/+9 2013-09-01aio / timers: use g_usleep() not sleep()Alex Bligh1-3/+3 2013-08-22aio / timers: remove dummy_io_handler_flush from tests/test-aio.cAlex Bligh1-7/+2 2013-08-22aio / timers: Add test harness for AioContext timersAlex Bligh1-0/+134 2013-08-22aio / timers: Add QEMUTimerListGroup to AioContextAlex Bligh1-0/+3 2013-08-19aio: drop io_flush argumentStefan Hajnoczi1-20/+20 2013-08-19tests: drop event_active_cb()Stefan Hajnoczi1-14/+8 2013-08-19aio: stop using .io_flush()Stefan Hajnoczi1-5/+5 2013-08-19tests: adjust test-aio to new aio_poll() semanticsStefan Hajnoczi1-9/+17 2013-01-17aio: Fix return value of aio_poll()Kevin Wolf1-2/+2 2012-12-19block: move include files to include/block/Paolo Bonzini1-1/+1 2012-12-11tests: use aio_poll() instead of aio_flush() in test-aio.cStefan Hajnoczi1-16/+15 2012-11-26tests: add AioContext unit testsPaolo Bonzini1-0/+667