lkml.org 
[lkml]   [2022]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 6/6] net: marvell: prestera: Implement initial inetaddr notifiers
On Thu, Dec 30, 2021 at 04:39:23PM +0200, Ido Schimmel wrote:
> > + return -EEXIST;
> > + }
> > + re = prestera_rif_entry_create(port->sw, &re_key,
> > + prestera_fix_tb_id(kern_tb_id),
> > + port_dev->dev_addr);
> > + if (!re) {
> > + NL_SET_ERR_MSG_MOD(extack, "Can't create rif_entry");
> > + return -EINVAL;
> > + }
> > + dev_hold(port_dev);
>
> What is the purpose of this dev_hold()?
>

To make sure the port_dev is not freed before rif destroyed.

\
 
 \ /
  Last update: 2022-01-06 05:32    [W:0.058 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site