net/9p/trans_virtio.c: Use BUG_ON
[firefly-linux-kernel-4.4.55.git] / net / 9p / trans_virtio.c
index 0117b9fb8480d4a51830ff0e59a591a6ffeb2105..9e3d81cb9f0822e3d0342918ab873b6538193b7c 100644 (file)
@@ -183,8 +183,7 @@ pack_sg_list(struct scatterlist *sg, int start, int limit, char *data,
                sg_set_buf(&sg[index++], data, s);
                count -= s;
                data += s;
-               if (index > limit)
-                       BUG();
+               BUG_ON(index > limit);
        }
 
        return index-start;