svn commit: r365301 - stable/12/sys/dev/fdc

Mark Johnston markj at FreeBSD.org
Thu Sep 3 13:57:21 UTC 2020


Author: markj
Date: Thu Sep  3 13:57:20 2020
New Revision: 365301
URL: https://svnweb.freebsd.org/changeset/base/365301

Log:
  MFC r364872:
  fdc(4): Handle errors from fdc_in() properly.
  
  PR:	248940

Modified:
  stable/12/sys/dev/fdc/fdc.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/fdc/fdc.c
==============================================================================
--- stable/12/sys/dev/fdc/fdc.c	Thu Sep  3 13:57:05 2020	(r365300)
+++ stable/12/sys/dev/fdc/fdc.c	Thu Sep  3 13:57:20 2020	(r365301)
@@ -491,7 +491,7 @@ fdc_cmd(struct fdc_data *fdc, int n_out, ...)
 	n_in = va_arg(ap, int);
 	for (n = 0; n < n_in; n++) {
 		int *ptr = va_arg(ap, int *);
-		if (fdc_in(fdc, ptr) < 0) {
+		if (fdc_in(fdc, ptr) != 0) {
 			char msg[50];
 			snprintf(msg, sizeof(msg),
 				"cmd %02x failed at in byte %d of %d\n",
@@ -586,7 +586,7 @@ fdc_sense_int(struct fdc_data *fdc, int *st0p, int *cy
 		return (FD_NOT_VALID);
 	}
 
-	if (fdc_in(fdc, &cyl) < 0)
+	if (fdc_in(fdc, &cyl) != 0)
 		return fdc_err(fdc, "can't get cyl num\n");
 
 	if (cylp)


More information about the svn-src-all mailing list