]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/rapidio/devices/rio_mport_cdev.c
treewide: Use fallthrough pseudo-keyword
[mirror_ubuntu-jammy-kernel.git] / drivers / rapidio / devices / rio_mport_cdev.c
index 3abbba8c2b5b3f7320541fc0df31574dfb1dcf14..a30342942e26f996cab50a7ace832f6886f7dd7b 100644 (file)
@@ -981,7 +981,7 @@ static int rio_mport_transfer_ioctl(struct file *filp, void __user *arg)
 
        if (unlikely(copy_from_user(transfer,
                                    (void __user *)(uintptr_t)transaction.block,
-                                   transaction.count * sizeof(*transfer)))) {
+                                   array_size(sizeof(*transfer), transaction.count)))) {
                ret = -EFAULT;
                goto out_free;
        }
@@ -994,7 +994,7 @@ static int rio_mport_transfer_ioctl(struct file *filp, void __user *arg)
 
        if (unlikely(copy_to_user((void __user *)(uintptr_t)transaction.block,
                                  transfer,
-                                 transaction.count * sizeof(*transfer))))
+                                 array_size(sizeof(*transfer), transaction.count))))
                ret = -EFAULT;
 
 out_free:
@@ -2150,7 +2150,7 @@ static void mport_release_mapping(struct kref *ref)
        switch (map->dir) {
        case MAP_INBOUND:
                rio_unmap_inb_region(mport, map->phys_addr);
-               /* fall through */
+               fallthrough;
        case MAP_DMA:
                dma_free_coherent(mport->dev.parent, map->size,
                                  map->virt_addr, map->phys_addr);