forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/rockchip/rk628/rk628_combtxphy.c
....@@ -366,6 +366,10 @@
366366 ref_clk = clk_get_rate(combtxphy->ref_clk) / 1000; /* khz */
367367 if (combtxphy->division_mode)
368368 ref_clk /= 2;
369
+
370
+ if (!ref_clk)
371
+ return -EINVAL;
372
+
369373 /*
370374 * the reference clock at PFD(FPFD = ref_clk / ref_div) about
371375 * 25MHz is recommende, FPFD must range from 16MHz to 35MHz,