aboutsummaryrefslogtreecommitdiffstats
path: root/net/6lowpan/debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/6lowpan/debugfs.c')
-rw-r--r--net/6lowpan/debugfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/6lowpan/debugfs.c b/net/6lowpan/debugfs.c
index 1c140af06d52..600b9563bfc5 100644
--- a/net/6lowpan/debugfs.c
+++ b/net/6lowpan/debugfs.c
@@ -170,7 +170,8 @@ static void lowpan_dev_debugfs_ctx_init(struct net_device *dev,
struct dentry *root;
char buf[32];
- WARN_ON_ONCE(id > LOWPAN_IPHC_CTX_TABLE_SIZE);
+ if (WARN_ON_ONCE(id >= LOWPAN_IPHC_CTX_TABLE_SIZE))
+ return;
sprintf(buf, "%d", id);