kernel/drivers/net/ethernet/dec/tulip/eeprom.c
.. .. @@ -224,9 +224,7 @@ 224 224 return; 225 225 } 226 226 227 - mtable = kmalloc(sizeof(struct mediatable) +228 - count * sizeof(struct medialeaf),229 - GFP_KERNEL);227 + mtable = kmalloc(struct_size(mtable, mleaf, count), GFP_KERNEL);230 228 if (mtable == NULL) 231 229 return; /* Horrible, impossible failure. */ 232 230 last_mediatable = tp->mtable = mtable;