BZ: 31254
Change-Id: I9736b1c8b6bca677058ebca1dcdab11773dfc79a
Signed-off-by: Zhang Dongxing <dongxing.zhang@intel.com>
Reviewed-on: http://android.intel.com:8080/43030
Reviewed-by: Guerard, Christophe <christophe.guerard@intel.com>
Reviewed-by: Zhang, Jun <jun.zhang@intel.com>
Reviewed-by: Kanigeri, Hari K <hari.k.kanigeri@intel.com>
Tested-by: Guerard, Christophe <christophe.guerard@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
int rc;
size_t wlen = SECTOR_SIZE;
+ if (to >= emmc->start_block + emmc->block_count) {
+ printk(KERN_EMERG "%s: panic partition is full.\n", __func__);
+ return 0;
+ }
+
rc = emmc->write((char *)buf, (unsigned int)to);
if (rc) {
printk(KERN_EMERG