提交 0fb07a87 编写于 作者: K K. Y. Srinivasan 提交者: Greg Kroah-Hartman

Staging: hv: storvsc: Inline free_stor_device()

Inline the code for  free_stor_device() and get rid of the function.
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 a504de3a
...@@ -51,10 +51,6 @@ static inline struct storvsc_device *alloc_stor_device(struct hv_device *device) ...@@ -51,10 +51,6 @@ static inline struct storvsc_device *alloc_stor_device(struct hv_device *device)
return stor_device; return stor_device;
} }
static inline void free_stor_device(struct storvsc_device *device)
{
kfree(device);
}
/* Get the stordevice object iff exists and its refcount > 0 */ /* Get the stordevice object iff exists and its refcount > 0 */
static inline struct storvsc_device *must_get_stor_device( static inline struct storvsc_device *must_get_stor_device(
...@@ -394,7 +390,7 @@ int storvsc_dev_add(struct hv_device *device, ...@@ -394,7 +390,7 @@ int storvsc_dev_add(struct hv_device *device,
/* Send it back up */ /* Send it back up */
ret = storvsc_connect_to_vsp(device, device_info->ring_buffer_size); ret = storvsc_connect_to_vsp(device, device_info->ring_buffer_size);
if (ret) { if (ret) {
free_stor_device(stor_device); kfree(stor_device);
return ret; return ret;
} }
device_info->path_id = stor_device->path_id; device_info->path_id = stor_device->path_id;
...@@ -422,7 +418,7 @@ int storvsc_dev_remove(struct hv_device *device) ...@@ -422,7 +418,7 @@ int storvsc_dev_remove(struct hv_device *device)
/* Close the channel */ /* Close the channel */
vmbus_close(device->channel); vmbus_close(device->channel);
free_stor_device(stor_device); kfree(stor_device);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册