]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
CHROMIUM: gobi: Remove leaky replacement of fops in devqmi_write
authorMichael Spang <spang@chromium.org>
Wed, 14 Nov 2012 22:14:51 +0000 (17:14 -0500)
committerGerrit <chrome-bot@google.com>
Wed, 21 Nov 2012 23:07:18 +0000 (15:07 -0800)
The devqmi_write function sometimes overwrites devqmi_fops with
def_chr_fops. When that happens, the devqmi_fops reference is leaked,
and the file is never cleaned up because devqmi_release is not called.

It's not clear what this is for, and it looks like the other file
callbacks already check device_valid() before doing anything.
Therefore we can probably just remove this.

BUG=chrome-os-partner:16158
TEST=suspend_stress_test; stop cromo; cat /sys/module/gobi/refcnt

Change-Id: Ie8aecf98784165629864c90b60ee1c20d2106bef
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38058
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
drivers/net/usb/gobi/qmidevice.c

index d7bf4288ae4ed2f3d9669fb7c1f50a3e49a8c570..e3d9d42ed99c77500aaf0129ef6e389bfcb7a22d 100644 (file)
@@ -1413,8 +1413,6 @@ static ssize_t devqmi_write(struct file *file, const char __user * buf,
 
        if (!device_valid(handle->dev)) {
                GOBI_WARN("invalid device");
-               /* TODO(ttuttle): what the heck is this for: */
-               file->f_op = file->f_dentry->d_inode->i_fop;
                return -ENXIO;
        }