mtd/ftl: Don't call ferr if return value equals -ENOTTY

MIRTOS4BES-22

since -ENOTTY is an expected code to indicate IOCTL isn't supported

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I62cf58c514be696327ad769ab2f35099154bcb42
This commit is contained in:
Xiang Xiao 2021-02-05 11:08:43 +08:00 committed by Abdelatif Guettouche
parent 21190ab90d
commit f1e821833b
1 changed files with 2 additions and 2 deletions

View File

@ -497,7 +497,7 @@ static int ftl_geometry(FAR struct inode *inode,
static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
{
struct ftl_struct_s *dev ;
FAR struct ftl_struct_s *dev;
int ret;
finfo("Entry\n");
@ -542,7 +542,7 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
*/
ret = MTD_IOCTL(dev->mtd, cmd, arg);
if (ret < 0)
if (ret < 0 && ret != -ENOTTY)
{
ferr("ERROR: MTD ioctl(%04x) failed: %d\n", cmd, ret);
}