nbd: kill unused ret in recv_work
authorKefeng Wang <wangkefeng.wang@huawei.com>
Thu, 13 Jul 2017 11:20:44 +0000 (19:20 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Jul 2017 14:03:30 +0000 (08:03 -0600)
No need to return value in queue work, kill ret variable.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c

index dea7d85134ee6eaa04803f1a0ce4878756e1461a..87a0a29f6e7e3c5a5f84332cc72de4543e6a86dd 100644 (file)
@@ -626,7 +626,6 @@ static void recv_work(struct work_struct *work)
        struct nbd_device *nbd = args->nbd;
        struct nbd_config *config = nbd->config;
        struct nbd_cmd *cmd;
-       int ret = 0;
 
        while (1) {
                cmd = nbd_read_stat(nbd, args->index);
@@ -636,7 +635,6 @@ static void recv_work(struct work_struct *work)
                        mutex_lock(&nsock->tx_lock);
                        nbd_mark_nsock_dead(nbd, nsock, 1);
                        mutex_unlock(&nsock->tx_lock);
-                       ret = PTR_ERR(cmd);
                        break;
                }