forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c
....@@ -289,8 +289,7 @@
289289 if (clipt_size < CLIPT_MIN_HASH_BUCKETS)
290290 return NULL;
291291
292
- ctbl = kvzalloc(sizeof(*ctbl) +
293
- clipt_size*sizeof(struct list_head), GFP_KERNEL);
292
+ ctbl = kvzalloc(struct_size(ctbl, hash_list, clipt_size), GFP_KERNEL);
294293 if (!ctbl)
295294 return NULL;
296295