Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84849
b: refs/heads/master
c: 5423dd6
h: refs/heads/master
i:
  84847: 0245faf
v: v3
  • Loading branch information
Urs Thuermann authored and David S. Miller committed Feb 8, 2008
1 parent 1302af8 commit 125a108
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f58a5c8725b48f3e32851f9748527c8d1ff71b2
refs/heads/master: 5423dd67bd0108a180784c6f307646622e804c9b
18 changes: 6 additions & 12 deletions trunk/net/can/af_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ static int can_create(struct net *net, struct socket *sock, int protocol)
{
struct sock *sk;
struct can_proto *cp;
char module_name[sizeof("can-proto-000")];
int err = 0;

sock->state = SS_UNCONNECTED;
Expand All @@ -129,26 +128,21 @@ static int can_create(struct net *net, struct socket *sock, int protocol)
if (net != &init_net)
return -EAFNOSUPPORT;

#ifdef CONFIG_KMOD
/* try to load protocol module, when CONFIG_KMOD is defined */
if (!proto_tab[protocol]) {
sprintf(module_name, "can-proto-%d", protocol);
err = request_module(module_name);
err = request_module("can-proto-%d", protocol);

/*
* In case of error we only print a message but don't
* return the error code immediately. Below we will
* return -EPROTONOSUPPORT
*/
if (err == -ENOSYS) {
if (printk_ratelimit())
printk(KERN_INFO "can: request_module(%s)"
" not implemented.\n", module_name);
} else if (err) {
if (printk_ratelimit())
printk(KERN_ERR "can: request_module(%s)"
" failed.\n", module_name);
}
if (err && printk_ratelimit())
printk(KERN_ERR "can: request_module "
"(can-proto-%d) failed.\n", protocol);
}
#endif

spin_lock(&proto_tab_lock);
cp = proto_tab[protocol];
Expand Down

0 comments on commit 125a108

Please sign in to comment.