[PATCH 13/22] Staging: hv: Cleanup blkvsc_remove()

From: K. Y. Srinivasan
Date: Mon Apr 04 2011 - 18:38:00 EST


blkvsc_remove() cannot fail. Clean it up accordingly.

Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
Signed-off-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
Signed-off-by: Hank Janssen <hjanssen@xxxxxxxxxxxxx>
---
drivers/staging/hv/blkvsc_drv.c | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 32d542d..c0a7acd 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -555,22 +555,12 @@ static int blkvsc_remove(struct device *device)
struct hv_device *device_obj = device_to_hv_device(device);
struct block_device_context *blkdev = dev_get_drvdata(device);
unsigned long flags;
- int ret;
-
-
- if (!storvsc_drv_obj->base.dev_rm)
- return -1;

/*
* Call to the vsc driver to let it know that the device is being
* removed
*/
- ret = storvsc_drv_obj->base.dev_rm(device_obj);
- if (ret != 0) {
- /* TODO: */
- DPRINT_ERR(BLKVSC_DRV,
- "unable to remove blkvsc device (ret %d)", ret);
- }
+ storvsc_drv_obj->base.dev_rm(device_obj);

/* Get to a known state */
spin_lock_irqsave(&blkdev->lock, flags);
@@ -603,7 +593,8 @@ static int blkvsc_remove(struct device *device)

kfree(blkdev);

- return ret;
+ return 0;
+
}

static void blkvsc_shutdown(struct device *device)
--
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/