@@ -183,6 +183,7 @@ static void mmc_blk_put(struct mmc_blk_data *md)
md->usage--;
if (md->usage == 0) {
int devidx = mmc_get_devidx(md->disk);
+
blk_cleanup_queue(md->queue.queue);
__clear_bit(devidx, dev_use);
@@ -277,6 +278,7 @@ static ssize_t force_ro_store(struct device *dev, struct device_attribute *attr,
char *end;
struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev));
unsigned long set = simple_strtoul(buf, &end, 0);
+
if (end == buf) {
ret = -EINVAL;
goto out;
@@ -617,6 +619,7 @@ static int mmc_blk_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
int ret = -EINVAL;
+
if (cmd == MMC_IOC_CMD)
ret = mmc_blk_ioctl_cmd(bdev, (struct mmc_ioc_cmd __user *)arg);
return ret;
@@ -1717,6 +1720,7 @@ static int mmc_blk_cmd_err(struct mmc_blk_data *md, struct mmc_card *card,
int ret)
{
struct mmc_queue_req *mq_rq;
+
mq_rq = container_of(brq, struct mmc_queue_req, brq);
/*