mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-28 07:22:25 +02:00
fix patch direction
This commit is contained in:
parent
7999f54ea5
commit
cc3e4bc548
@ -4,16 +4,16 @@
|
|||||||
vsn = func->card->cccr.sdio_vsn;
|
vsn = func->card->cccr.sdio_vsn;
|
||||||
min_size = (vsn == SDIO_SDIO_REV_1_00) ? 28 : 42;
|
min_size = (vsn == SDIO_SDIO_REV_1_00) ? 28 : 42;
|
||||||
|
|
||||||
- if (buf[0] != 1)
|
- if (size < min_size || buf[0] != 1)
|
||||||
+ if (size < min_size || buf[0] != 1)
|
+ if (buf[0] != 1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* TPLFE_MAX_BLK_SIZE */
|
/* TPLFE_MAX_BLK_SIZE */
|
||||||
func->max_blksize = buf[12] | (buf[13] << 8);
|
func->max_blksize = buf[12] | (buf[13] << 8);
|
||||||
|
|
||||||
/* TPLFE_ENABLE_TIMEOUT_VAL, present in ver 1.1 and above */
|
/* TPLFE_ENABLE_TIMEOUT_VAL, present in ver 1.1 and above */
|
||||||
- if (vsn > SDIO_SDIO_REV_1_00 && size >= min_size)
|
- if (vsn > SDIO_SDIO_REV_1_00)
|
||||||
+ if (vsn > SDIO_SDIO_REV_1_00)
|
+ if (vsn > SDIO_SDIO_REV_1_00 && size >= min_size)
|
||||||
func->enable_timeout = (buf[28] | (buf[29] << 8)) * 10;
|
func->enable_timeout = (buf[28] | (buf[29] << 8)) * 10;
|
||||||
else
|
else
|
||||||
func->enable_timeout = jiffies_to_msecs(HZ);
|
func->enable_timeout = jiffies_to_msecs(HZ);
|
||||||
|
Loading…
Reference in New Issue
Block a user