lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 8 May 2020 11:54:07 +0300 From: Grygorii Strashko <grygorii.strashko@...com> To: Wei Yongjun <weiyongjun1@...wei.com>, "David S . Miller" <davem@...emloft.net>, Christophe JAILLET <christophe.jaillet@...adoo.fr>, Colin Ian King <colin.king@...onical.com>, Jakub Kicinski <kuba@...nel.org> CC: <netdev@...r.kernel.org>, <kernel-janitors@...r.kernel.org>, Hulk Robot <hulkci@...wei.com> Subject: Re: [PATCH net-next] net: ethernet: ti: fix error return code in am65_cpsw_nuss_probe() On 08/05/2020 05:10, Wei Yongjun wrote: > Fix to return negative error code -ENOMEM from the cpsw_ale_create() > error handling case instead of 0, as done elsewhere in this function. > > Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") > Reported-by: Hulk Robot <hulkci@...wei.com> > Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com> > --- > drivers/net/ethernet/ti/am65-cpsw-nuss.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c > index f8c589929308..066ba52f57cb 100644 > --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c > +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c > @@ -2065,6 +2065,7 @@ static int am65_cpsw_nuss_probe(struct platform_device *pdev) > common->ale = cpsw_ale_create(&ale_params); > if (!common->ale) { > dev_err(dev, "error initializing ale engine\n"); > + ret = -ENOMEM; > goto err_of_clear; > } > > > It seems not enough. For consistency, Could you update it as below? - cpsw_ale_create() to return PTR_ERR() in all places - users to use IS_ERR() and ret = PTR_ERR() -- Best regards, grygorii
Powered by blists - more mailing lists