Commit 2dd6a24f authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

wimax: remove some redundant assignments to variable result

In function i2400m_bm_buf_alloc there is no need to use a variable
'result' to return -ENOMEM, just return the literal value. In the
function i2400m_setup the variable 'result' is initialized with a
value that is never read, it is a redundant assignment that can
be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 19a46799
...@@ -740,9 +740,6 @@ EXPORT_SYMBOL_GPL(i2400m_error_recovery); ...@@ -740,9 +740,6 @@ EXPORT_SYMBOL_GPL(i2400m_error_recovery);
static static
int i2400m_bm_buf_alloc(struct i2400m *i2400m) int i2400m_bm_buf_alloc(struct i2400m *i2400m)
{ {
int result;
result = -ENOMEM;
i2400m->bm_cmd_buf = kzalloc(I2400M_BM_CMD_BUF_SIZE, GFP_KERNEL); i2400m->bm_cmd_buf = kzalloc(I2400M_BM_CMD_BUF_SIZE, GFP_KERNEL);
if (i2400m->bm_cmd_buf == NULL) if (i2400m->bm_cmd_buf == NULL)
goto error_bm_cmd_kzalloc; goto error_bm_cmd_kzalloc;
...@@ -754,7 +751,7 @@ int i2400m_bm_buf_alloc(struct i2400m *i2400m) ...@@ -754,7 +751,7 @@ int i2400m_bm_buf_alloc(struct i2400m *i2400m)
error_bm_ack_buf_kzalloc: error_bm_ack_buf_kzalloc:
kfree(i2400m->bm_cmd_buf); kfree(i2400m->bm_cmd_buf);
error_bm_cmd_kzalloc: error_bm_cmd_kzalloc:
return result; return -ENOMEM;
} }
...@@ -843,7 +840,7 @@ EXPORT_SYMBOL_GPL(i2400m_reset); ...@@ -843,7 +840,7 @@ EXPORT_SYMBOL_GPL(i2400m_reset);
*/ */
int i2400m_setup(struct i2400m *i2400m, enum i2400m_bri bm_flags) int i2400m_setup(struct i2400m *i2400m, enum i2400m_bri bm_flags)
{ {
int result = -ENODEV; int result;
struct device *dev = i2400m_dev(i2400m); struct device *dev = i2400m_dev(i2400m);
struct wimax_dev *wimax_dev = &i2400m->wimax_dev; struct wimax_dev *wimax_dev = &i2400m->wimax_dev;
struct net_device *net_dev = i2400m->wimax_dev.net_dev; struct net_device *net_dev = i2400m->wimax_dev.net_dev;
......
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