Re: [PATCH bluetooth-next] mac802154: fix ieee802154_register_hw error handling

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

 



On 04/13/2015 02:38 PM, Alexander Aring wrote:

> Currently if ieee802154_if_add failed, we don't unregister the wpan phy
> which was registrated before. This patch adds a correct error handling

s/registrated/registered

> for unregister the wpan phy when ieee802154_if_add failed.
>
> Signed-off-by: Alexander Aring <alex.aring@xxxxxxxxx>
> ---
>  net/mac802154/main.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/net/mac802154/main.c b/net/mac802154/main.c
> index 8500378..beece7b 100644
> --- a/net/mac802154/main.c
> +++ b/net/mac802154/main.c
> @@ -166,13 +166,15 @@ int ieee802154_register_hw(struct ieee802154_hw *hw)
>  	if (IS_ERR(dev)) {
>  		rtnl_unlock();
>  		rc = PTR_ERR(dev);
> -		goto out_wq;
> +		goto out_phy;
>  	}
>  
>  	rtnl_unlock();
>  
>  	return 0;
>  
> +out_phy:
> +	wpan_phy_unregister(local->phy);
>  out_wq:
>  	destroy_workqueue(local->workqueue);
>  out:

--
Thanks,
Varka Bhadram.

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux