aboutsummaryrefslogtreecommitdiffstats
path: root/net/can/af_can.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/can/af_can.c')
-rw-r--r--net/can/af_can.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/can/af_can.c b/net/can/af_can.c
index 094fc5332d42..8ce926d3b2cb 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -58,6 +58,7 @@
58#include <linux/skbuff.h> 58#include <linux/skbuff.h>
59#include <linux/can.h> 59#include <linux/can.h>
60#include <linux/can/core.h> 60#include <linux/can/core.h>
61#include <linux/ratelimit.h>
61#include <net/net_namespace.h> 62#include <net/net_namespace.h>
62#include <net/sock.h> 63#include <net/sock.h>
63 64
@@ -161,8 +162,8 @@ static int can_create(struct net *net, struct socket *sock, int protocol,
161 * return the error code immediately. Below we will 162 * return the error code immediately. Below we will
162 * return -EPROTONOSUPPORT 163 * return -EPROTONOSUPPORT
163 */ 164 */
164 if (err && printk_ratelimit()) 165 if (err)
165 printk(KERN_ERR "can: request_module " 166 printk_ratelimited(KERN_ERR "can: request_module "
166 "(can-proto-%d) failed.\n", protocol); 167 "(can-proto-%d) failed.\n", protocol);
167 168
168 cp = can_get_proto(protocol); 169 cp = can_get_proto(protocol);