[PATCH v3 4/6] net/failsafe: remove check around pthread_mutex_init()
Stephen Hemminger
stephen at networkplumber.org
Mon Jan 13 20:10:35 CET 2025
On Sun, 12 Jan 2025 21:20:19 +0100
Ariel Otilibili <otilibil at eurecom.fr> wrote:
> diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
> index 32811403b4c8..e1c77cdf4fd1 100644
> --- a/drivers/net/failsafe/failsafe.c
> +++ b/drivers/net/failsafe/failsafe.c
> @@ -147,11 +147,7 @@ fs_mutex_init(struct fs_priv *priv)
> ERROR("Cannot set mutex type - %s", strerror(ret));
> return ret;
> }
> - ret = pthread_mutex_init(&priv->hotplug_mutex, &attr);
> - if (ret) {
> - ERROR("Cannot initiate mutex - %s", strerror(ret));
> - return ret;
> - }
> + pthread_mutex_init(&priv->hotplug_mutex, &attr);
> return 0;
Could be a tail call here.
return pthread_mutex_init(&priv->hotplug_mutex, &attr);
More information about the dev
mailing list