Commit e22f7f5f authored by David S. Miller's avatar David S. Miller

net/bluetooth/bnep/sock.c: Kill another sockfd_lookup re-implementation.

parent 834b9fe7
......@@ -55,31 +55,6 @@
#define BT_DBG( A... )
#endif
static struct socket *sockfd_lookup(int fd, int *err)
{
struct file *file;
struct inode *inode;
struct socket *sock;
if (!(file = fget(fd))) {
*err = -EBADF;
return NULL;
}
inode = file->f_dentry->d_inode;
if (!inode->i_sock || !(sock = SOCKET_I(inode))) {
*err = -ENOTSOCK;
fput(file);
return NULL;
}
if (sock->file != file) {
printk(KERN_ERR "socki_lookup: socket file changed!\n");
sock->file = file;
}
return sock;
}
static int bnep_sock_release(struct socket *sock)
{
struct sock *sk = sock->sk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment