diff options
| author | Biju Das <[email protected]> | 2022-03-07 18:48:43 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2022-03-08 12:27:33 +0000 |
| commit | 1a4e53d2fc4f68aa654ad96d13ad042e1a8e8a7d (patch) | |
| tree | ab9cf29ca24c09d21381afee97ca71f7dfdeb105 /drivers/usb/cdns3/cdns3-imx.c | |
| parent | spi: rockchip: terminate dma transmission when slave abort (diff) | |
| download | kernel-1a4e53d2fc4f68aa654ad96d13ad042e1a8e8a7d.tar.gz kernel-1a4e53d2fc4f68aa654ad96d13ad042e1a8e8a7d.zip | |
spi: Fix invalid sgs value
max_seg_size is unsigned int and it can have a value up to 2^32
(for eg:-RZ_DMAC driver sets dma_set_max_seg_size as U32_MAX)
When this value is used in min_t() as an integer type, it becomes
-1 and the value of sgs becomes 0.
Fix this issue by replacing the 'int' data type with 'unsigned int'
in min_t().
Signed-off-by: Biju Das <[email protected]>
Reviewed-by: Lad Prabhakar <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions
