patch-2.4.19 linux-2.4.19/drivers/block/swim_iop.c

Next file: linux-2.4.19/drivers/block/umem.c
Previous file: linux-2.4.19/drivers/block/swim3.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/drivers/block/swim_iop.c linux-2.4.19/drivers/block/swim_iop.c
@@ -359,9 +359,10 @@
 		err = swimiop_eject(fs);
 		return err;
 	case FDGETPRM:
-	        err = copy_to_user((void *) param, (void *) &floppy_type,
-				   sizeof(struct floppy_struct));
-		return err;
+	        if (copy_to_user((void *) param, (void *) &floppy_type,
+				 sizeof(struct floppy_struct)))
+			return -EFAULT;
+		return 0;
 	}
 	return -ENOTTY;
 }

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