Skip to content

Commit

Permalink
USB: OTG: msm: Fix bug in msm_otg_mode_write
Browse files Browse the repository at this point in the history
The driver private data is retrieved incorrectly which results
a crash when written into "mode" debugfs file.

Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Pavankumar Kondeti authored and Greg Kroah-Hartman committed Feb 17, 2011
1 parent 7018773 commit e2904ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/otg/msm72k_otg.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,8 @@ static int msm_otg_mode_open(struct inode *inode, struct file *file)
static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf,
size_t count, loff_t *ppos)
{
struct msm_otg *motg = file->private_data;
struct seq_file *s = file->private_data;
struct msm_otg *motg = s->private;
char buf[16];
struct otg_transceiver *otg = &motg->otg;
int status = count;
Expand Down

0 comments on commit e2904ee

Please sign in to comment.