Bug 248940 - [PATCH] dev/fdc: fix error code handling
Summary: [PATCH] dev/fdc: fix error code handling
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Mark Johnston
URL: https://github.com/freebsd/freebsd/pu...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-27 00:22 UTC by Tong Zhang
Modified: 2020-09-03 13:58 UTC (History)
1 user (show)

See Also:


Attachments
0001-dev-fdc-fix-error-code-handling (1.04 KB, application/mbox)
2020-08-27 00:22 UTC, Tong Zhang
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tong Zhang 2020-08-27 00:22:15 UTC
Created attachment 217563 [details]
0001-dev-fdc-fix-error-code-handling

fdc_in() can only return 0(success) and 1(error), however the caller is
checking using <0
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-08-27 16:34:53 UTC
A commit references this bug:

Author: markj
Date: Thu Aug 27 16:34:34 UTC 2020
New revision: 364872
URL: https://svnweb.freebsd.org/changeset/base/364872

Log:
  fdc(4): Handle errors from fdc_in() properly.

  fdc_in() returns only 0 and 1, some callers were checking incorrectly
  for failure.

  PR:		248940
  Submitted by:	Tong Zhang <ztong0001@gmail.com>
  MFC after:	1 week

Changes:
  head/sys/dev/fdc/fdc.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-09-03 13:57:54 UTC
A commit references this bug:

Author: markj
Date: Thu Sep  3 13:57:21 UTC 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

Changes:
_U  stable/12/
  stable/12/sys/dev/fdc/fdc.c