提交 37f13252 编写于 作者: K Kefeng Wang 提交者: Ilya Dryomov

rbd: silence bogus uninitialized use warning in rbd_acquire_lock()

  drivers/block/rbd.c: In function 'rbd_acquire_lock':
  drivers/block/rbd.c:3602:44: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Silence the warning, found it when built old kernel(3.10) with
OBS(opensuse build service).
Signed-off-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 4214fb15
...@@ -3435,7 +3435,7 @@ static void rbd_acquire_lock(struct work_struct *work) ...@@ -3435,7 +3435,7 @@ static void rbd_acquire_lock(struct work_struct *work)
struct rbd_device *rbd_dev = container_of(to_delayed_work(work), struct rbd_device *rbd_dev = container_of(to_delayed_work(work),
struct rbd_device, lock_dwork); struct rbd_device, lock_dwork);
enum rbd_lock_state lock_state; enum rbd_lock_state lock_state;
int ret; int ret = 0;
dout("%s rbd_dev %p\n", __func__, rbd_dev); dout("%s rbd_dev %p\n", __func__, rbd_dev);
again: again:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册