Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5ffe634 authored by Viresh Kumar's avatar Viresh Kumar Committed by Jiri Kosina
Browse files

net: Drop unlikely before IS_ERR(_OR_NULL)



IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
is no need to do that again from its callers. Drop it.

Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 18e8e5c7
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1143,7 +1143,7 @@ static int ovs_flow_cmd_set(struct sk_buff *skb, struct genl_info *info)
						info, OVS_FLOW_CMD_NEW, false,
						info, OVS_FLOW_CMD_NEW, false,
						ufid_flags);
						ufid_flags);


		if (unlikely(IS_ERR(reply))) {
		if (IS_ERR(reply)) {
			error = PTR_ERR(reply);
			error = PTR_ERR(reply);
			goto err_unlock_ovs;
			goto err_unlock_ovs;
		}
		}
+1 −1
Original line number Original line Diff line number Diff line
@@ -4475,7 +4475,7 @@ static int sctp_getsockopt_peeloff(struct sock *sk, int len, char __user *optval
	}
	}


	newfile = sock_alloc_file(newsock, 0, NULL);
	newfile = sock_alloc_file(newsock, 0, NULL);
	if (unlikely(IS_ERR(newfile))) {
	if (IS_ERR(newfile)) {
		put_unused_fd(retval);
		put_unused_fd(retval);
		sock_release(newsock);
		sock_release(newsock);
		return PTR_ERR(newfile);
		return PTR_ERR(newfile);
+3 −3
Original line number Original line Diff line number Diff line
@@ -373,7 +373,7 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname)


	file = alloc_file(&path, FMODE_READ | FMODE_WRITE,
	file = alloc_file(&path, FMODE_READ | FMODE_WRITE,
		  &socket_file_ops);
		  &socket_file_ops);
	if (unlikely(IS_ERR(file))) {
	if (IS_ERR(file)) {
		/* drop dentry, keep inode */
		/* drop dentry, keep inode */
		ihold(d_inode(path.dentry));
		ihold(d_inode(path.dentry));
		path_put(&path);
		path_put(&path);
@@ -1303,7 +1303,7 @@ SYSCALL_DEFINE4(socketpair, int, family, int, type, int, protocol,
	}
	}


	newfile1 = sock_alloc_file(sock1, flags, NULL);
	newfile1 = sock_alloc_file(sock1, flags, NULL);
	if (unlikely(IS_ERR(newfile1))) {
	if (IS_ERR(newfile1)) {
		err = PTR_ERR(newfile1);
		err = PTR_ERR(newfile1);
		goto out_put_unused_both;
		goto out_put_unused_both;
	}
	}
@@ -1467,7 +1467,7 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
		goto out_put;
		goto out_put;
	}
	}
	newfile = sock_alloc_file(newsock, flags, sock->sk->sk_prot_creator->name);
	newfile = sock_alloc_file(newsock, flags, sock->sk->sk_prot_creator->name);
	if (unlikely(IS_ERR(newfile))) {
	if (IS_ERR(newfile)) {
		err = PTR_ERR(newfile);
		err = PTR_ERR(newfile);
		put_unused_fd(newfd);
		put_unused_fd(newfd);
		sock_release(newsock);
		sock_release(newsock);