Marek Vasut
c2e0363571
mtd: cqspi: Fix division by zero
...
Both dummy.nbytes and dummy.buswidth may be zero. By not checking
the later, it is possible to trigger division by zero and a crash.
This does happen with tiny SPI NOR framework in SPL. Fix this by
adding the check and returning zero dummy bytes in such a case.
Fixes: 38b0852b0e ("spi: cadence-qspi: Add support for octal DTR flashes")
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Jagan Teki <jagan@amarulasolutions.com >
Cc: Vignesh R <vigneshr@ti.com >
Cc: Pratyush Yadav <p.yadav@ti.com >
[trini: Drop Pratyush's RB as his requested changes weren't made as
Marek disagreed]
2021-10-04 08:51:14 -04:00
..
2021-07-06 10:38:03 -06:00
2021-09-13 18:23:13 -04:00
2021-07-06 10:38:03 -06:00
2021-08-05 19:46:35 -04:00
2021-07-21 10:27:35 -06:00
2021-08-22 11:04:52 +02:00
2021-03-22 19:23:27 +13:00
2021-07-06 10:38:03 -06:00
2021-09-07 10:34:29 +08:00
2021-09-17 14:47:03 -04:00
2021-08-08 11:27:27 -06:00
2021-07-06 10:38:03 -06:00
2021-09-08 16:12:09 -04:00
2021-09-22 21:31:05 +02:00
2021-02-02 15:33:42 -05:00
2021-08-02 13:32:14 -04:00
2021-07-06 10:38:03 -06:00
2021-08-21 18:23:02 -04:00
2021-07-26 09:18:45 +02:00
2021-03-08 10:59:10 +08:00
2021-09-13 18:23:13 -04:00
2021-07-06 10:38:03 -06:00
2021-09-13 18:23:13 -04:00
2021-07-06 10:38:03 -06:00
2021-07-06 10:38:03 -06:00
2021-07-06 10:38:03 -06:00
2021-01-13 09:52:58 +01:00
2021-08-09 14:46:51 +02:00
2021-09-14 00:02:10 +01:00
2021-09-28 12:03:21 -04:00
2021-07-06 10:38:03 -06:00
2021-09-13 18:23:13 -04:00
2021-07-06 10:38:03 -06:00
2021-07-06 10:38:03 -06:00
2021-09-13 18:23:13 -04:00
2021-07-06 10:38:03 -06:00
2021-09-27 07:46:13 +02:00
2021-09-14 09:07:18 -04:00
2021-08-02 13:32:14 -04:00
2021-07-06 10:38:03 -06:00
2021-08-02 13:32:14 -04:00
2021-08-02 13:32:14 -04:00
2021-07-23 10:16:39 -04:00
2021-07-15 17:56:04 +05:30
2021-08-06 09:32:03 +02:00
2021-07-06 10:38:03 -06:00
2021-08-06 09:32:02 +02:00
2021-08-05 19:46:35 -04:00
2021-08-02 13:32:14 -04:00
2021-07-06 10:38:03 -06:00
2021-08-26 08:08:11 +02:00
2021-07-06 10:38:03 -06:00
2021-10-04 08:51:14 -04:00
2021-07-06 10:38:03 -06:00
2021-07-20 23:33:54 +02:00
2021-04-20 07:31:12 -04:00
2021-07-23 07:13:25 -04:00
2021-07-06 10:38:03 -06:00
2021-08-02 15:11:40 +08:00
2021-08-01 09:05:24 -06:00
2021-07-06 10:38:03 -06:00
2021-09-22 21:29:56 +02:00
2021-08-06 13:46:40 -04:00
2021-09-13 18:23:13 -04:00
2021-07-07 13:34:42 -04:00
2021-07-06 10:38:03 -06:00
2021-09-20 07:39:29 +02:00
2021-07-06 10:38:03 -06:00
2021-07-23 10:16:39 -04:00
2021-08-09 14:46:51 +02:00