Inline the code for free_stor_device() and get rid of the function.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 */
static inline struct storvsc_device *must_get_stor_device(
/* Send it back up */
ret = storvsc_connect_to_vsp(device, device_info->ring_buffer_size);
if (ret) {
- free_stor_device(stor_device);
+ kfree(stor_device);
return ret;
}
device_info->path_id = stor_device->path_id;
/* Close the channel */
vmbus_close(device->channel);
- free_stor_device(stor_device);
+ kfree(stor_device);
return 0;
}