hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
....@@ -343,6 +343,9 @@
343343 * PLL_Output_Frequency: it is equal to DDR-Clock-Frequency * 2
344344 */
345345 fref = prate / 2;
346
+ if (!fref)
347
+ return 0;
348
+
346349 if (rate > 1000000000UL)
347350 fout = 1000000000UL;
348351 else
....@@ -356,6 +359,9 @@
356359 u64 tmp;
357360 u32 delta;
358361
362
+ if (!_prediv)
363
+ continue;
364
+
359365 tmp = (u64)fout * _prediv;
360366 do_div(tmp, fref);
361367 _fbdiv = tmp;