forked from Imagelibrary/rtems
dosfs/fat_fat_operations.c: Explicitly ignore return (Coverity ID 26048)
Coverity spotted that the return code from fat_set_fat_cluster() was ignored. But it should be because we want to return the status that caused us to hit the cleanup path.
This commit is contained in:
@@ -150,8 +150,13 @@ cleanup:
|
||||
|
||||
/* cleanup activity */
|
||||
fat_free_fat_clusters_chain(fs_info, (*chain));
|
||||
/* trying to save last allocated cluster for future use */
|
||||
fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE);
|
||||
|
||||
/*
|
||||
* Trying to save last allocated cluster for future use
|
||||
*
|
||||
* NOTE: Deliberately ignoring return value.
|
||||
*/
|
||||
(void) fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE);
|
||||
fat_buf_release(fs_info);
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user