[Intel-wired-lan] [PATCH] ice: Make use of the helper function devm_add_action_or_reset()
G, GurucharanX
gurucharanx.g at intel.com
Fri Oct 1 15:28:59 UTC 2021
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Cai Huoqing
> Sent: Wednesday, September 22, 2021 6:30 PM
> To: caihuoqing at baidu.com
> Cc: netdev at vger.kernel.org; linux-kernel at vger.kernel.org; intel-wired-
> lan at lists.osuosl.org; Jakub Kicinski <kuba at kernel.org>; David S. Miller
> <davem at davemloft.net>
> 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 <caihuoqing at baidu.com>
> ---
> drivers/net/ethernet/intel/ice/ice_devlink.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
Tested-by: Gurucharan G <gurucharanx.g at intel.com> (A Contingent worker at Intel)
More information about the Intel-wired-lan
mailing list