> > As the possible failure of the dma_set_max_seg_size(), we should > > better check the return value of the dma_set_max_seg_size(). > > I think formally you're correct. dma_set_max_seg_size() could return an > error if dev->dma_parms was not present. > > However, since ISM devices are PCI attached (and will remain PCI > attached I believe) we can take the existance of dev->dma_parms for > granted since pci_device_add() (in drivers/pci/probe.c) will make that > point to the pci_dev's dma_parms for every PCI device. > > So I'm not sure how important this fix is. Another function call can fail eventually. dma_set_seg_boundary() https://elixir.bootlin.com/linux/v6.10-rc5/source/include/linux/dma-mapping.h#L562 Will it become relevant to complete the error detection and corresponding exception handling any further? Regards, Markus