mmc: block: ioctl return EINVAL if cmd unknown
authorHuang, Tao <huangtao@rock-chips.com>
Fri, 4 Mar 2016 09:06:12 +0000 (17:06 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Fri, 4 Mar 2016 10:21:42 +0000 (18:21 +0800)
commit7c1abbfe2a27bae41202d4b46687f82eba0c1d5b
tree61dc0ae5ca04bd44d5fc2ce5bae8837302c91d15
parented1a9bcb8ebd736e2416484274c39d3dea995355
mmc: block: ioctl return EINVAL if cmd unknown

We should return -EINVAL if cmd is not MMC_IOC_CMD or MMC_IOC_MULTI_CMD,
otherwise blkdev_roset will return -EPERM.

Android adb, make_block_device_writable ioctl BLKROSET will return error,
make adb remount with error:
remount of /system failed;
couldn't make block device writable: Operation not permitted

Change-Id: I7d0a5727110c0fd9ad301a377e5002eae23f8aed
Fixes: a5f5774c55a2 ("mmc: block: Add new ioctl to send multi commands")
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
drivers/mmc/card/block.c