diff options
author | Mustafa Ismail <mustafa.ismail@intel.com> | 2016-08-22 18:17:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-07 15:21:19 +0200 |
commit | 1a38d2ab4932698cd4f257f2df86111505846950 (patch) | |
tree | 6e0dd6bca9e417e1a8380bb36e41e033751f454a /drivers | |
parent | d8db2da632f3af15c4e12d3982a7102a746c21d2 (diff) | |
download | linux-stable-1a38d2ab4932698cd4f257f2df86111505846950.tar.gz linux-stable-1a38d2ab4932698cd4f257f2df86111505846950.tar.bz2 linux-stable-1a38d2ab4932698cd4f257f2df86111505846950.zip |
i40iw: Add missing check for interface already open
commit faa739fb5df56aadab96bcd2f6eb3486cc3a3aec upstream.
In i40iw_open(), check if interface is already open
and return success if it is.
Fixes: 8e06af711bf2 ("i40iw: add main, hdr, status")
Reported-by: Stefan Assmann <sassmann@redhat.com>
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c index 6e9081380a27..0cbbe4038298 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_main.c +++ b/drivers/infiniband/hw/i40iw/i40iw_main.c @@ -1558,6 +1558,10 @@ static int i40iw_open(struct i40e_info *ldev, struct i40e_client *client) enum i40iw_status_code status; struct i40iw_handler *hdl; + hdl = i40iw_find_netdev(ldev->netdev); + if (hdl) + return 0; + hdl = kzalloc(sizeof(*hdl), GFP_KERNEL); if (!hdl) return -ENOMEM; |