I agree, was just pointing out what seemed to be the problem with the code.
On Thu, 2008-09-25 at 22:39 -0400, Bob Copeland wrote: > 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. > _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel