Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 2020 13:57:21 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r365301 - stable/12/sys/dev/fdc
Message-ID:  <202009031357.083DvL7F036044@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009031357.083DvL7F036044>