Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Mario Schuknecht <mario.schuknecht@dresearch-fe.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>

authored by

Mario Schuknecht and committed by
Felipe Balbi
acba23fe df6738d0

+3 -3
+3 -3
drivers/usb/gadget/function/f_fs.c
··· 1611 1611 mutex_init(&epfile->mutex); 1612 1612 init_waitqueue_head(&epfile->wait); 1613 1613 if (ffs->user_flags & FUNCTIONFS_VIRTUAL_ADDR) 1614 - sprintf(epfiles->name, "ep%02x", ffs->eps_addrmap[i]); 1614 + sprintf(epfile->name, "ep%02x", ffs->eps_addrmap[i]); 1615 1615 else 1616 - sprintf(epfiles->name, "ep%u", i); 1617 - epfile->dentry = ffs_sb_create_file(ffs->sb, epfiles->name, 1616 + sprintf(epfile->name, "ep%u", i); 1617 + epfile->dentry = ffs_sb_create_file(ffs->sb, epfile->name, 1618 1618 epfile, 1619 1619 &ffs_epfile_operations); 1620 1620 if (unlikely(!epfile->dentry)) {