Message ID | 20160908074206.13662-1-colin.king@canonical.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Colin King <colin.king@canonical.com> Date: Thu, 8 Sep 2016 08:42:06 +0100 > From: Colin Ian King <colin.king@canonical.com> > > dtefacs.calling_ae and called_ae are both 20 element __u8 arrays and > cannot be null and hence are redundant checks. Remove these. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> Indeed, and if they were pointers they would be in userspace and would need proper uaccess handling. Applied to net-next, thanks.
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index a750f33..f83b74d 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -1500,12 +1500,8 @@ out_fac_release: goto out_dtefac_release; if (dtefacs.calling_len > X25_MAX_AE_LEN) goto out_dtefac_release; - if (dtefacs.calling_ae == NULL) - goto out_dtefac_release; if (dtefacs.called_len > X25_MAX_AE_LEN) goto out_dtefac_release; - if (dtefacs.called_ae == NULL) - goto out_dtefac_release; x25->dte_facilities = dtefacs; rc = 0; out_dtefac_release: