Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acba23fe authored by Mario Schuknecht's avatar Mario Schuknecht Committed by Felipe Balbi
Browse files

usb: gadget: f_fs: Fix loop variable



Use if-loop variable 'epfile' instead of start variable 'epfiles'. Now the
correct endpoint file name is stored.

Signed-off-by: default avatarMario Schuknecht <mario.schuknecht@dresearch-fe.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent df6738d0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1611,10 +1611,10 @@ static int ffs_epfiles_create(struct ffs_data *ffs)
		mutex_init(&epfile->mutex);
		init_waitqueue_head(&epfile->wait);
		if (ffs->user_flags & FUNCTIONFS_VIRTUAL_ADDR)
			sprintf(epfiles->name, "ep%02x", ffs->eps_addrmap[i]);
			sprintf(epfile->name, "ep%02x", ffs->eps_addrmap[i]);
		else
			sprintf(epfiles->name, "ep%u", i);
		epfile->dentry = ffs_sb_create_file(ffs->sb, epfiles->name,
			sprintf(epfile->name, "ep%u", i);
		epfile->dentry = ffs_sb_create_file(ffs->sb, epfile->name,
						 epfile,
						 &ffs_epfile_operations);
		if (unlikely(!epfile->dentry)) {