From: K. Y. Srinivasan Date: Sat, 27 Aug 2011 18:31:00 +0000 (-0700) Subject: Staging: hv: storvsc: Inline free_stor_device() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0fb07a87ec663652bea02a54faa05fb4b3d0c20f;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git Staging: hv: storvsc: Inline free_stor_device() Inline the code for free_stor_device() and get rid of the function. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c index 827b6a307eff..8c62829f5993 100644 --- a/drivers/staging/hv/storvsc.c +++ b/drivers/staging/hv/storvsc.c @@ -51,10 +51,6 @@ static inline struct storvsc_device *alloc_stor_device(struct hv_device *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 */ static inline struct storvsc_device *must_get_stor_device( @@ -394,7 +390,7 @@ int storvsc_dev_add(struct hv_device *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; @@ -422,7 +418,7 @@ int storvsc_dev_remove(struct hv_device *device) /* Close the channel */ vmbus_close(device->channel); - free_stor_device(stor_device); + kfree(stor_device); return 0; }