Commit 3bb83baf authored by Mitch Williams's avatar Mitch Williams Committed by Jeff Kirsher

i40e: Clean up dead code

The function i40e_client_prepare() can never return an error. So make it
void and quit checking its return value.

Change-ID: I9ff311e2324dde329eb68648efb2c94aaff856db
Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent cfffef76
...@@ -653,13 +653,11 @@ static int i40e_client_release(struct i40e_client *client) ...@@ -653,13 +653,11 @@ static int i40e_client_release(struct i40e_client *client)
* i40e_client_prepare - prepare client specific resources * i40e_client_prepare - prepare client specific resources
* @client: pointer to the registered client * @client: pointer to the registered client
* *
* Return 0 on success or < 0 on error
**/ **/
static int i40e_client_prepare(struct i40e_client *client) static void i40e_client_prepare(struct i40e_client *client)
{ {
struct i40e_device *ldev; struct i40e_device *ldev;
struct i40e_pf *pf; struct i40e_pf *pf;
int ret = 0;
mutex_lock(&i40e_device_mutex); mutex_lock(&i40e_device_mutex);
list_for_each_entry(ldev, &i40e_devices, list) { list_for_each_entry(ldev, &i40e_devices, list) {
...@@ -669,7 +667,6 @@ static int i40e_client_prepare(struct i40e_client *client) ...@@ -669,7 +667,6 @@ static int i40e_client_prepare(struct i40e_client *client)
i40e_service_event_schedule(pf); i40e_service_event_schedule(pf);
} }
mutex_unlock(&i40e_device_mutex); mutex_unlock(&i40e_device_mutex);
return ret;
} }
/** /**
...@@ -926,13 +923,9 @@ int i40e_register_client(struct i40e_client *client) ...@@ -926,13 +923,9 @@ int i40e_register_client(struct i40e_client *client)
set_bit(__I40E_CLIENT_REGISTERED, &client->state); set_bit(__I40E_CLIENT_REGISTERED, &client->state);
mutex_unlock(&i40e_client_mutex); mutex_unlock(&i40e_client_mutex);
if (i40e_client_prepare(client)) { i40e_client_prepare(client);
ret = -EIO;
goto out;
}
pr_info("i40e: Registered client %s with return code %d\n", pr_info("i40e: Registered client %s\n", client->name);
client->name, ret);
out: out:
return ret; return ret;
} }
......
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