Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mmc-v4.7-rc7' of git://git.linaro.org/people/ulf.hansson/mmc

Pull MMC fixes from Ulf Hansson:
"Here are a few late mmc fixes intended for v4.7 final.

MMC core:
- Fix eMMC packed command header endianness
- Fix free of uninitialized buffer for mmc ioctl

MMC host:
- pxamci: Fix potential oops in ->probe()"

* tag 'mmc-v4.7-rc7' of git://git.linaro.org/people/ulf.hansson/mmc:
mmc: pxamci: fix potential oops
mmc: block: fix packed command header endianness
mmc: block: fix free of uninitialized 'idata->buf'

+18 -14
+9 -7
drivers/mmc/card/block.c
··· 355 355 goto idata_err; 356 356 } 357 357 358 - if (!idata->buf_bytes) 358 + if (!idata->buf_bytes) { 359 + idata->buf = NULL; 359 360 return idata; 361 + } 360 362 361 363 idata->buf = kmalloc(idata->buf_bytes, GFP_KERNEL); 362 364 if (!idata->buf) { ··· 1788 1786 1789 1787 packed_cmd_hdr = packed->cmd_hdr; 1790 1788 memset(packed_cmd_hdr, 0, sizeof(packed->cmd_hdr)); 1791 - packed_cmd_hdr[0] = (packed->nr_entries << 16) | 1792 - (PACKED_CMD_WR << 8) | PACKED_CMD_VER; 1789 + packed_cmd_hdr[0] = cpu_to_le32((packed->nr_entries << 16) | 1790 + (PACKED_CMD_WR << 8) | PACKED_CMD_VER); 1793 1791 hdr_blocks = mmc_large_sector(card) ? 8 : 1; 1794 1792 1795 1793 /* ··· 1803 1801 ((brq->data.blocks * brq->data.blksz) >= 1804 1802 card->ext_csd.data_tag_unit_size); 1805 1803 /* Argument of CMD23 */ 1806 - packed_cmd_hdr[(i * 2)] = 1804 + packed_cmd_hdr[(i * 2)] = cpu_to_le32( 1807 1805 (do_rel_wr ? MMC_CMD23_ARG_REL_WR : 0) | 1808 1806 (do_data_tag ? MMC_CMD23_ARG_TAG_REQ : 0) | 1809 - blk_rq_sectors(prq); 1807 + blk_rq_sectors(prq)); 1810 1808 /* Argument of CMD18 or CMD25 */ 1811 - packed_cmd_hdr[((i * 2)) + 1] = 1809 + packed_cmd_hdr[((i * 2)) + 1] = cpu_to_le32( 1812 1810 mmc_card_blockaddr(card) ? 1813 - blk_rq_pos(prq) : blk_rq_pos(prq) << 9; 1811 + blk_rq_pos(prq) : blk_rq_pos(prq) << 9); 1814 1812 packed->blocks += blk_rq_sectors(prq); 1815 1813 i++; 1816 1814 }
+9 -7
drivers/mmc/host/pxamci.c
··· 789 789 gpio_direction_output(gpio_power, 790 790 host->pdata->gpio_power_invert); 791 791 } 792 - if (gpio_is_valid(gpio_ro)) 792 + if (gpio_is_valid(gpio_ro)) { 793 793 ret = mmc_gpio_request_ro(mmc, gpio_ro); 794 - if (ret) { 795 - dev_err(&pdev->dev, "Failed requesting gpio_ro %d\n", gpio_ro); 796 - goto out; 797 - } else { 798 - mmc->caps2 |= host->pdata->gpio_card_ro_invert ? 799 - 0 : MMC_CAP2_RO_ACTIVE_HIGH; 794 + if (ret) { 795 + dev_err(&pdev->dev, "Failed requesting gpio_ro %d\n", 796 + gpio_ro); 797 + goto out; 798 + } else { 799 + mmc->caps2 |= host->pdata->gpio_card_ro_invert ? 800 + 0 : MMC_CAP2_RO_ACTIVE_HIGH; 801 + } 800 802 } 801 803 802 804 if (gpio_is_valid(gpio_cd))