patch-2.4.19 linux-2.4.19/drivers/scsi/scsi_ioctl.c

Next file: linux-2.4.19/drivers/scsi/scsi_lib.c
Previous file: linux-2.4.19/drivers/scsi/scsi_error.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/drivers/scsi/scsi_ioctl.c linux-2.4.19/drivers/scsi/scsi_ioctl.c
@@ -377,9 +377,12 @@
 scsi_ioctl_get_pci(Scsi_Device * dev, void *arg)
 {
 
-        if (!dev->host->pci_dev) return -ENXIO;
-        return copy_to_user(arg, dev->host->pci_dev->slot_name,
-                            sizeof(dev->host->pci_dev->slot_name));
+        if (!dev->host->pci_dev)
+        	return -ENXIO;
+        if(copy_to_user(arg, dev->host->pci_dev->slot_name,
+                            sizeof(dev->host->pci_dev->slot_name)))
+		return -EFAULT;
+	return 0;
 }
 
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)