aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r--net/bridge/br_device.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index f2a08477e0f5..0dd01a05bd59 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -218,16 +218,16 @@ static void br_netpoll_cleanup(struct net_device *dev)
218 br_netpoll_disable(p); 218 br_netpoll_disable(p);
219} 219}
220 220
221static int __br_netpoll_enable(struct net_bridge_port *p, gfp_t gfp) 221static int __br_netpoll_enable(struct net_bridge_port *p)
222{ 222{
223 struct netpoll *np; 223 struct netpoll *np;
224 int err; 224 int err;
225 225
226 np = kzalloc(sizeof(*p->np), gfp); 226 np = kzalloc(sizeof(*p->np), GFP_KERNEL);
227 if (!np) 227 if (!np)
228 return -ENOMEM; 228 return -ENOMEM;
229 229
230 err = __netpoll_setup(np, p->dev, gfp); 230 err = __netpoll_setup(np, p->dev);
231 if (err) { 231 if (err) {
232 kfree(np); 232 kfree(np);
233 return err; 233 return err;
@@ -237,16 +237,15 @@ static int __br_netpoll_enable(struct net_bridge_port *p, gfp_t gfp)
237 return err; 237 return err;
238} 238}
239 239
240int br_netpoll_enable(struct net_bridge_port *p, gfp_t gfp) 240int br_netpoll_enable(struct net_bridge_port *p)
241{ 241{
242 if (!p->br->dev->npinfo) 242 if (!p->br->dev->npinfo)
243 return 0; 243 return 0;
244 244
245 return __br_netpoll_enable(p, gfp); 245 return __br_netpoll_enable(p);
246} 246}
247 247
248static int br_netpoll_setup(struct net_device *dev, struct netpoll_info *ni, 248static int br_netpoll_setup(struct net_device *dev, struct netpoll_info *ni)
249 gfp_t gfp)
250{ 249{
251 struct net_bridge *br = netdev_priv(dev); 250 struct net_bridge *br = netdev_priv(dev);
252 struct net_bridge_port *p; 251 struct net_bridge_port *p;
@@ -255,7 +254,7 @@ static int br_netpoll_setup(struct net_device *dev, struct netpoll_info *ni,
255 list_for_each_entry(p, &br->port_list, list) { 254 list_for_each_entry(p, &br->port_list, list) {
256 if (!p->dev) 255 if (!p->dev)
257 continue; 256 continue;
258 err = __br_netpoll_enable(p, gfp); 257 err = __br_netpoll_enable(p);
259 if (err) 258 if (err)
260 goto fail; 259 goto fail;
261 } 260 }