aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/block.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-07-17 02:10:27 +1000
committerJames Morris <james.l.morris@oracle.com>2014-07-17 02:10:27 +1000
commitbd89bb78f35fd175db7a9cfc504d789b6ca0f7b0 (patch)
treedee9f8b31f3d6d2fb141541da88e1cc1329b017e /drivers/mtd/ubi/block.c
parentMerge commit 'v3.15' into next (diff)
parentLinux 3.16-rc5 (diff)
downloadlinux-dev-bd89bb78f35fd175db7a9cfc504d789b6ca0f7b0.tar.xz
linux-dev-bd89bb78f35fd175db7a9cfc504d789b6ca0f7b0.zip
Sync with the changes pushed by Serge in the last merge window.
Diffstat (limited to 'drivers/mtd/ubi/block.c')
-rw-r--r--drivers/mtd/ubi/block.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c
index 8d659e6a1b4c..8457df7ec5af 100644
--- a/drivers/mtd/ubi/block.c
+++ b/drivers/mtd/ubi/block.c
@@ -253,7 +253,7 @@ static int do_ubiblock_request(struct ubiblock *dev, struct request *req)
* flash access anyway.
*/
mutex_lock(&dev->dev_mutex);
- ret = ubiblock_read(dev, req->buffer, sec, len);
+ ret = ubiblock_read(dev, bio_data(req->bio), sec, len);
mutex_unlock(&dev->dev_mutex);
return ret;
@@ -432,8 +432,10 @@ int ubiblock_create(struct ubi_volume_info *vi)
* Rembember workqueues are cheap, they're not threads.
*/
dev->wq = alloc_workqueue("%s", 0, 0, gd->disk_name);
- if (!dev->wq)
+ if (!dev->wq) {
+ ret = -ENOMEM;
goto out_free_queue;
+ }
INIT_WORK(&dev->work, ubiblock_do_work);
mutex_lock(&devices_mutex);