Merge tag 'overflow-v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
[linux-2.6-block.git] / drivers / infiniband / core / cache.c
index cad8f1d7954bf81119c1f3a43aafb4bedf493818..3330d97faa1e540c499428489ad5055ae89e5e20 100644 (file)
@@ -502,7 +502,7 @@ static int __ib_cache_gid_get(struct ib_device *ib_dev, u8 port, int index,
                return -EINVAL;
 
        if (table->data_vec[index].props & GID_TABLE_ENTRY_INVALID)
-               return -EAGAIN;
+               return -EINVAL;
 
        memcpy(gid, &table->data_vec[index].gid, sizeof(*gid));
        if (attr) {