| 338 | ****************************************************************************/ |
| 339 | |
| 340 | void devif_conn_callback_free(FAR struct net_driver_s *dev, |
| 341 | FAR struct devif_callback_s *cb, |
| 342 | FAR struct devif_callback_s **list_head, |
| 343 | FAR struct devif_callback_s **list_tail) |
| 344 | { |
| 345 | /* Check if the device pointer is still valid. It could be invalid if, for |
| 346 | * example, the device were unregistered between the time when the callback |
| 347 | * was allocated and the time when the callback was freed. |
| 348 | */ |
| 349 | |
| 350 | if (dev && !netdev_verify(dev)) |
| 351 | { |
| 352 | /* The device reference is longer valid */ |
| 353 | |
| 354 | dev = NULL; |
| 355 | } |
| 356 | |
| 357 | /* Then free the callback */ |
| 358 | |
| 359 | devif_callback_free(dev, cb, list_head, list_tail); |
| 360 | } |
| 361 | |
| 362 | /**************************************************************************** |
| 363 | * Name: devif_dev_callback_free |
no test coverage detected