On Fri, Sep 26, 2008 at 09:26:10AM +1000, Geoffrey McRae wrote: > I can see the reason why this seg faults... > > ani_state = kzalloc(sizeof(struct ath5k_ani_state), GFP_KERNEL); > > shoud be > > *ani_state = kzalloc(sizeof(struct ath5k_ani_state), GFP_KERNEL);
That's still a strange way to write it. IMO idiomatic C would just be: struct ani_stats *ani_stats; ani_stats = kzalloc(sizeof(struct ath5k_ani_stats), GFP_KERNEL); ah->ah_ani_stats = ani_stats; (Note pointer assignment _after_ kzalloc.) Some people like doing sizeof(*ani_stats) but I never really cared for that myself. -- Bob Copeland %% www.bobcopeland.com _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel