Re: [PATCH net] net: bcmasp: Fix error code in probe()

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

 



On Thu, Jul 04, 2024 at 10:19:44AM -0500, Dan Carpenter wrote:
> Return an error code if bcmasp_interface_create() fails.  Don't return

nitpick: redundant space after "fails."

> success.
> 
> Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
>  drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> index a806dadc4196..20c6529ec135 100644
> --- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
> @@ -1380,6 +1380,7 @@ static int bcmasp_probe(struct platform_device *pdev)
>  			dev_err(dev, "Cannot create eth interface %d\n", i);
>  			bcmasp_remove_intfs(priv);
>  			of_node_put(intf_node);
> +			ret = -ENOMEM;
>  			goto of_put_exit;
>  		}
>  		list_add_tail(&intf->list, &priv->intfs);
> -- 
> 2.43.0
> 
> 

The patch actually fixes an obvious bug.

Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@xxxxxxxxx>




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux