aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25
diff options
context:
space:
mode:
Diffstat (limited to 'net/ax25')
-rw-r--r--net/ax25/ax25_iface.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c
index dd9b7fee3df8..51e293420b7f 100644
--- a/net/ax25/ax25_iface.c
+++ b/net/ax25/ax25_iface.c
@@ -154,7 +154,7 @@ int ax25_listen_register(ax25_address *callsign, struct net_device *dev)
154 return 0; 154 return 0;
155 155
156 if ((listen = kmalloc(sizeof(*listen), GFP_ATOMIC)) == NULL) 156 if ((listen = kmalloc(sizeof(*listen), GFP_ATOMIC)) == NULL)
157 return 0; 157 return -ENOMEM;
158 158
159 listen->callsign = *callsign; 159 listen->callsign = *callsign;
160 listen->dev = dev; 160 listen->dev = dev;
@@ -164,7 +164,7 @@ int ax25_listen_register(ax25_address *callsign, struct net_device *dev)
164 listen_list = listen; 164 listen_list = listen;
165 spin_unlock_bh(&listen_lock); 165 spin_unlock_bh(&listen_lock);
166 166
167 return 1; 167 return 0;
168} 168}
169 169
170EXPORT_SYMBOL(ax25_listen_register); 170EXPORT_SYMBOL(ax25_listen_register);
@@ -225,7 +225,8 @@ int ax25_listen_mine(ax25_address *callsign, struct net_device *dev)
225 225
226 spin_lock_bh(&listen_lock); 226 spin_lock_bh(&listen_lock);
227 for (listen = listen_list; listen != NULL; listen = listen->next) 227 for (listen = listen_list; listen != NULL; listen = listen->next)
228 if (ax25cmp(&listen->callsign, callsign) == 0 && (listen->dev == dev || listen->dev == NULL)) { 228 if (ax25cmp(&listen->callsign, callsign) == 0 &&
229 (listen->dev == dev || listen->dev == NULL)) {
229 spin_unlock_bh(&listen_lock); 230 spin_unlock_bh(&listen_lock);
230 return 1; 231 return 1;
231 } 232 }