Re: [PATCH net-next v1] devlink: Make devlink_register to be void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 22, 2021 at 11:58:03AM +0300, Leon Romanovsky wrote:
> diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
> index eef13cd20f19..96f211f52ac3 100644
> --- a/net/dsa/dsa2.c
> +++ b/net/dsa/dsa2.c
> @@ -804,10 +804,7 @@ static int dsa_switch_setup(struct dsa_switch *ds)
>  	dl_priv = devlink_priv(ds->devlink);
>  	dl_priv->ds = ds;
>  
> -	err = devlink_register(ds->devlink);
> -	if (err)
> -		goto free_devlink;
> -
> +	devlink_register(ds->devlink);
>  	/* Setup devlink port instances now, so that the switch
>  	 * setup() can register regions etc, against the ports
>  	 */
> @@ -863,10 +860,8 @@ static int dsa_switch_setup(struct dsa_switch *ds)
>  		if (dp->ds == ds)
>  			dsa_port_devlink_teardown(dp);
>  	devlink_unregister(ds->devlink);
> -free_devlink:
>  	devlink_free(ds->devlink);
>  	ds->devlink = NULL;
> -
>  	return err;
>  }

Acked-by: Vladimir Oltean <olteanv@xxxxxxxxx> # dsa



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux