Skip to content

Commit 2dd6a24

Browse files
Colin Ian Kingdavem330
authored andcommitted
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: Colin Ian King <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 19a4679 commit 2dd6a24

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/net/wimax/i2400m/driver.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -740,9 +740,6 @@ EXPORT_SYMBOL_GPL(i2400m_error_recovery);
740740
static
741741
int i2400m_bm_buf_alloc(struct i2400m *i2400m)
742742
{
743-
int result;
744-
745-
result = -ENOMEM;
746743
i2400m->bm_cmd_buf = kzalloc(I2400M_BM_CMD_BUF_SIZE, GFP_KERNEL);
747744
if (i2400m->bm_cmd_buf == NULL)
748745
goto error_bm_cmd_kzalloc;
@@ -754,7 +751,7 @@ int i2400m_bm_buf_alloc(struct i2400m *i2400m)
754751
error_bm_ack_buf_kzalloc:
755752
kfree(i2400m->bm_cmd_buf);
756753
error_bm_cmd_kzalloc:
757-
return result;
754+
return -ENOMEM;
758755
}
759756

760757

@@ -843,7 +840,7 @@ EXPORT_SYMBOL_GPL(i2400m_reset);
843840
*/
844841
int i2400m_setup(struct i2400m *i2400m, enum i2400m_bri bm_flags)
845842
{
846-
int result = -ENODEV;
843+
int result;
847844
struct device *dev = i2400m_dev(i2400m);
848845
struct wimax_dev *wimax_dev = &i2400m->wimax_dev;
849846
struct net_device *net_dev = i2400m->wimax_dev.net_dev;

0 commit comments

Comments
 (0)