xfrm: Fix NULL pointer dereference in xfrm_input when skb_dst_force clears the dst_entry.
[linux/fpc-iii.git] / drivers / base / container.c
blob1ba42d2d353223e683be57bad5154df07abda10e
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * System bus type for containers.
5 * Copyright (C) 2013, Intel Corporation
6 * Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
7 */
9 #include <linux/container.h>
11 #include "base.h"
13 #define CONTAINER_BUS_NAME "container"
15 static int trivial_online(struct device *dev)
17 return 0;
20 static int container_offline(struct device *dev)
22 struct container_dev *cdev = to_container_dev(dev);
24 return cdev->offline ? cdev->offline(cdev) : 0;
27 struct bus_type container_subsys = {
28 .name = CONTAINER_BUS_NAME,
29 .dev_name = CONTAINER_BUS_NAME,
30 .online = trivial_online,
31 .offline = container_offline,
34 void __init container_dev_init(void)
36 int ret;
38 ret = subsys_system_register(&container_subsys, NULL);
39 if (ret)
40 pr_err("%s() failed: %d\n", __func__, ret);