xtensa: set proper error code for simdisk_setup()
authorChengguang Xu <cgxu519@gmail.com>
Sun, 5 May 2019 14:26:07 +0000 (22:26 +0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 6 May 2019 21:36:44 +0000 (14:36 -0700)
Change error code to -ENOMEM from -EIO because
the error is related to memory allocating.

Signed-off-by: Chengguang Xu <cgxu519@gmail.com>
Message-Id: <1557066367-4783-2-git-send-email-cgxu519@gmail.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/platforms/iss/simdisk.c

index 5fac8b7..f9cd458 100644 (file)
@@ -297,7 +297,7 @@ out_alloc_disk:
        blk_cleanup_queue(dev->queue);
        dev->queue = NULL;
 out_alloc_queue:
-       return -EIO;
+       return -ENOMEM;
 }
 
 static int __init simdisk_init(void)