diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-08-24 13:47:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-25 07:47:11 +0300 |
commit | 256fbe111218ccc3de4aff1aab44c9b08cd06c92 (patch) | |
tree | 0b23ebfecedddbfd2229c40a481986842f8c1852 /drivers/net/ethernet/huawei/hinic | |
parent | 43cee2d2465cab8289dc1d9206b90fcf975a604f (diff) | |
download | linux-256fbe111218ccc3de4aff1aab44c9b08cd06c92.tar.xz |
hinic: uninitialized variable in hinic_api_cmd_init()
We never set the error code in this function.
Fixes: eabf0fad81d5 ("net-next/hinic: Initialize api cmd resources")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/huawei/hinic')
-rw-r--r-- | drivers/net/ethernet/huawei/hinic/hinic_hw_api_cmd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_api_cmd.c b/drivers/net/ethernet/huawei/hinic/hinic_hw_api_cmd.c index 8901801fe426..c40603a183df 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_hw_api_cmd.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_api_cmd.c @@ -941,6 +941,7 @@ int hinic_api_cmd_init(struct hinic_api_cmd_chain **chain, if (IS_ERR(chain[chain_type])) { dev_err(&pdev->dev, "Failed to create chain %d\n", chain_type); + err = PTR_ERR(chain[chain_type]); goto err_create_chain; } } |