Thread (2 messages) flat view 2 messages, 2 authors, 2021-10-01

RE: [Intel-wired-lan] [PATCH] ice: Make use of the helper function devm_add_action_or_reset()

From: G, GurucharanX <hidden>
Date: 2021-10-01 15:29:11
Also in: intel-wired-lan, lkml

-----Original Message-----
From: Intel-wired-lan <redacted> On Behalf Of
Cai Huoqing
Sent: Wednesday, September 22, 2021 6:30 PM
To: caihuoqing@baidu.com
Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; intel-wired-
lan@lists.osuosl.org; Jakub Kicinski [off-list ref]; David S. Miller
[off-list ref]
Subject: [Intel-wired-lan] [PATCH] ice: Make use of the helper function
devm_add_action_or_reset()

The helper function devm_add_action_or_reset() will internally call
devm_add_action(), and if devm_add_action() fails then it will execute the
action mentioned and return the error code. So use
devm_add_action_or_reset() instead of devm_add_action() to simplify the
error handling, reduce the code.

Signed-off-by: Cai Huoqing <redacted>
---
 drivers/net/ethernet/intel/ice/ice_devlink.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Tested-by: Gurucharan G <redacted> (A Contingent worker at Intel)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help