diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/atm/common.c | 2 | ||||
-rw-r--r-- | net/atm/resources.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/net/atm/common.c b/net/atm/common.c index 83454e12317d..db9318fc6031 100644 --- a/net/atm/common.c +++ b/net/atm/common.c | |||
@@ -424,7 +424,7 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci) | |||
424 | vcc->qos.rxtp.traffic_class == ATM_ANYCLASS) | 424 | vcc->qos.rxtp.traffic_class == ATM_ANYCLASS) |
425 | return -EINVAL; | 425 | return -EINVAL; |
426 | if (likely(itf != ATM_ITF_ANY)) { | 426 | if (likely(itf != ATM_ITF_ANY)) { |
427 | dev = atm_dev_lookup(itf); | 427 | dev = try_then_request_module(atm_dev_lookup(itf), "atm-device-%d", itf); |
428 | } else { | 428 | } else { |
429 | dev = NULL; | 429 | dev = NULL; |
430 | spin_lock(&atm_dev_lock); | 430 | spin_lock(&atm_dev_lock); |
diff --git a/net/atm/resources.c b/net/atm/resources.c index 415d2615d475..35f3ceb76868 100644 --- a/net/atm/resources.c +++ b/net/atm/resources.c | |||
@@ -245,7 +245,8 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg) | |||
245 | if (get_user(number, &sioc->number)) | 245 | if (get_user(number, &sioc->number)) |
246 | return -EFAULT; | 246 | return -EFAULT; |
247 | 247 | ||
248 | if (!(dev = atm_dev_lookup(number))) | 248 | if (!(dev = try_then_request_module(atm_dev_lookup(number), |
249 | "atm-device-%d", number))) | ||
249 | return -ENODEV; | 250 | return -ENODEV; |
250 | 251 | ||
251 | switch (cmd) { | 252 | switch (cmd) { |