diff options
Diffstat (limited to 'drivers/net/wireless/ath/dfs_pattern_detector.c')
| -rw-r--r-- | drivers/net/wireless/ath/dfs_pattern_detector.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c b/drivers/net/wireless/ath/dfs_pattern_detector.c index 700da9f4531e..a798ff11183d 100644 --- a/drivers/net/wireless/ath/dfs_pattern_detector.c +++ b/drivers/net/wireless/ath/dfs_pattern_detector.c @@ -199,7 +199,7 @@ channel_detector_create(struct dfs_pattern_detector *dpd, u16 freq) u32 i; struct channel_detector *cd; - cd = kzalloc(struct_size(cd, detectors, dpd->num_radar_types), GFP_ATOMIC); + cd = kzalloc_flex(*cd, detectors, dpd->num_radar_types, GFP_ATOMIC); if (cd == NULL) goto fail; @@ -354,7 +354,7 @@ dfs_pattern_detector_init(struct ath_common *common, if (!IS_ENABLED(CONFIG_CFG80211_CERTIFICATION_ONUS)) return NULL; - dpd = kmalloc(sizeof(*dpd), GFP_KERNEL); + dpd = kmalloc_obj(*dpd, GFP_KERNEL); if (dpd == NULL) return NULL; |
