diff options
Diffstat (limited to 'net/rds/message.c')
-rw-r--r-- | net/rds/message.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/message.c b/net/rds/message.c index f4c3be0878e9..1f73a7358a8e 100644 --- a/net/rds/message.c +++ b/net/rds/message.c | |||
@@ -240,6 +240,7 @@ struct scatterlist *rds_message_alloc_sgs(struct rds_message *rm, int nents) | |||
240 | struct scatterlist *sg_ret; | 240 | struct scatterlist *sg_ret; |
241 | 241 | ||
242 | WARN_ON(rm->m_used_sgs + nents > rm->m_total_sgs); | 242 | WARN_ON(rm->m_used_sgs + nents > rm->m_total_sgs); |
243 | WARN_ON(!nents); | ||
243 | 244 | ||
244 | sg_ret = &sg_first[rm->m_used_sgs]; | 245 | sg_ret = &sg_first[rm->m_used_sgs]; |
245 | sg_init_table(sg_ret, nents); | 246 | sg_init_table(sg_ret, nents); |