diff --git a/net/rds/message.c b/net/rds/message.c index f4c3be0878e97226d1b2d28d8504f8374274d169..1f73a7358a8e9eeaa238dcd687627ed14e9c6be6 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) struct scatterlist *sg_ret; WARN_ON(rm->m_used_sgs + nents > rm->m_total_sgs); + WARN_ON(!nents); sg_ret = &sg_first[rm->m_used_sgs]; sg_init_table(sg_ret, nents);