Commit 2c9c989a authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[X25]: Do not use lvalue in assignment.

parent 49302efb
...@@ -816,7 +816,7 @@ int ax25_create(struct socket *sock, int protocol) ...@@ -816,7 +816,7 @@ int ax25_create(struct socket *sock, int protocol)
if ((sk = sk_alloc(PF_AX25, GFP_ATOMIC, 1, NULL)) == NULL) if ((sk = sk_alloc(PF_AX25, GFP_ATOMIC, 1, NULL)) == NULL)
return -ENOMEM; return -ENOMEM;
ax25 = ax25_sk(sk) = ax25_create_cb(); ax25 = sk->sk_protinfo = ax25_create_cb();
if (!ax25) { if (!ax25) {
sk_free(sk); sk_free(sk);
return -ENOMEM; return -ENOMEM;
...@@ -901,7 +901,7 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev) ...@@ -901,7 +901,7 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev)
memcpy(ax25->digipeat, oax25->digipeat, sizeof(ax25_digi)); memcpy(ax25->digipeat, oax25->digipeat, sizeof(ax25_digi));
} }
ax25_sk(sk) = ax25; sk->sk_protinfo = ax25;
ax25->sk = sk; ax25->sk = sk;
return sk; return sk;
......
...@@ -438,7 +438,7 @@ static struct sock *x25_alloc_socket(void) ...@@ -438,7 +438,7 @@ static struct sock *x25_alloc_socket(void)
if (!sk) if (!sk)
goto out; goto out;
x25 = x25_sk(sk) = kmalloc(sizeof(*x25), GFP_ATOMIC); x25 = sk->sk_protinfo = kmalloc(sizeof(*x25), GFP_ATOMIC);
if (!x25) if (!x25)
goto frees; goto frees;
......
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