smartfs : Addressed review comments of #524 and fixed build errors
authorKavya <kavya.nunna@partner.samsung.com>
Tue, 5 Sep 2017 12:17:06 +0000 (17:47 +0530)
committerKavya <kavya.nunna@partner.samsung.com>
Thu, 7 Sep 2017 10:18:55 +0000 (15:48 +0530)
commit592e0aaea6a6fbbc99347cd3cc7ffce7b044bffd
treeaed76f6360e16c21288c577342858367596d2653
parent7840cd52e37f1f16f7b5c0b888fc659599260d9b
smartfs : Addressed review comments of #524 and fixed build errors

Build error: retry was defined only under CONFIG_MTD_SMART_WEAR_LEVEL
It's been made removed from above conditional check.
review comments:
free is replaced with kmm_free
Return value check after MTD_READ in smart_findfreephyssector
Freeing the sector_buff in error conditions to avoid leakage of memory
Removing the redundant code in error conditions

Signed-off-by: Kavya <kavya.nunna@partner.samsung.com>
os/fs/driver/mtd/smart.c