提交 2c61e0cc 编写于 作者: H Heinrich Schuchardt 提交者: Alexander Graf

efi_loader: superfluous statement in is_dir()

When is_dir() is called we have already execute set_blk_dev(fh).
So don't call it again.

This fixes CoverityScan CID 184093.
Reported-by: NTom Rini <trini@konsulko.com>
Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: NAlexander Graf <agraf@suse.de>
上级 6f566c23
......@@ -52,11 +52,18 @@ static int set_blk_dev(struct file_handle *fh)
return fs_set_blk_dev_with_part(fh->fs->desc, fh->fs->part);
}
/**
* is_dir() - check if file handle points to directory
*
* We assume that set_blk_dev(fh) has been called already.
*
* @fh: file handle
* Return: true if file handle points to a directory
*/
static int is_dir(struct file_handle *fh)
{
struct fs_dir_stream *dirs;
set_blk_dev(fh);
dirs = fs_opendir(fh->path);
if (!dirs)
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册