Mathias Kresin <dev@xxxxxxxxx> writes: > If clk_get returns an error, rt2x00dev->clk is set to NULL. In > contrast to the common clock framework provided clk_get_rate(), at > least the ramips and bcm63xx legacy implementation of the clk API > access the rate member of the clk struct without a NULL check. This > results into a kernel panic if we do not have a (SoC) clock. > > Call clk_get_rate only if we have a clock to fix the issues. This > approach is similar to what is done in the kernel at various places. > Usually clk_get_rate() is only called if clk_get_rate() doesn't return > an error. > > Signed-off-by: Mathias Kresin <dev@xxxxxxxxx> > --- > > Resend, the first mail had the wrong list in cc. Then you should mark this as v2: https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing -- Kalle Valo