* [PATCH net-next] hinic: uninitialized variable in hinic_api_cmd_init()
@ 2017-08-24 10:47 Dan Carpenter
2017-08-24 12:24 ` Aviad Krawczyk
2017-08-25 4:48 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2017-08-24 10:47 UTC (permalink / raw)
To: Aviad Krawczyk; +Cc: netdev, kernel-janitors
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>
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;
}
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] hinic: uninitialized variable in hinic_api_cmd_init()
2017-08-24 10:47 [PATCH net-next] hinic: uninitialized variable in hinic_api_cmd_init() Dan Carpenter
@ 2017-08-24 12:24 ` Aviad Krawczyk
2017-08-25 4:48 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Aviad Krawczyk @ 2017-08-24 12:24 UTC (permalink / raw)
To: Dan Carpenter; +Cc: netdev, kernel-janitors
On 8/24/2017 1:47 PM, Dan Carpenter wrote:
> 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>
>
> 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;
> }
> }
>
>
Thanks a lot, Reviewed-by: Aviad Krawczyk <aviad.krawczyk@huawei.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] hinic: uninitialized variable in hinic_api_cmd_init()
2017-08-24 10:47 [PATCH net-next] hinic: uninitialized variable in hinic_api_cmd_init() Dan Carpenter
2017-08-24 12:24 ` Aviad Krawczyk
@ 2017-08-25 4:48 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-08-25 4:48 UTC (permalink / raw)
To: dan.carpenter; +Cc: aviad.krawczyk, netdev, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 24 Aug 2017 13:47:39 +0300
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-25 4:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24 10:47 [PATCH net-next] hinic: uninitialized variable in hinic_api_cmd_init() Dan Carpenter
2017-08-24 12:24 ` Aviad Krawczyk
2017-08-25 4:48 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).