diff options
Diffstat (limited to 'drivers/staging/usbip/usbip_common.c')
-rw-r--r-- | drivers/staging/usbip/usbip_common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 75189feac380..539fa5785afe 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c @@ -411,7 +411,7 @@ struct socket *sockfd_to_socket(unsigned int sockfd) return NULL; } - inode = file->f_dentry->d_inode; + inode = file_inode(file); if (!inode || !S_ISSOCK(inode->i_mode)) { fput(file); @@ -672,9 +672,8 @@ int usbip_recv_iso(struct usbip_device *ud, struct urb *urb) return 0; /* my Bluetooth dongle gets ISO URBs which are np = 0 */ - if (np == 0) { + if (np == 0) return 0; - } buff = kzalloc(size, GFP_KERNEL); if (!buff) |