Commit 1a38d2ab authored by Mustafa Ismail's avatar Mustafa Ismail Committed by Greg Kroah-Hartman

i40iw: Add missing check for interface already open

commit faa739fb upstream.

In i40iw_open(), check if interface is already open
and return success if it is.

Fixes: 8e06af71 ("i40iw: add main, hdr, status")
Reported-by: default avatarStefan Assmann <sassmann@redhat.com>
Signed-off-by: default avatarMustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d8db2da6
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment