Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pad Don't call next callout when an error occurs in ...



details:   https://anonhg.NetBSD.org/src/rev/5b0cb266ff1d
branches:  trunk
changeset: 457314:5b0cb266ff1d
user:      isaki <isaki%NetBSD.org@localhost>
date:      Wed Jun 19 12:52:41 2019 +0000

description:
Don't call next callout when an error occurs in start_output.

diffstat:

 sys/dev/pad/pad.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r e711004d27ff -r 5b0cb266ff1d sys/dev/pad/pad.c
--- a/sys/dev/pad/pad.c Wed Jun 19 12:51:26 2019 +0000
+++ b/sys/dev/pad/pad.c Wed Jun 19 12:52:41 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.60 2019/06/19 12:51:26 isaki Exp $ */
+/* $NetBSD: pad.c,v 1.61 2019/06/19 12:52:41 isaki Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.60 2019/06/19 12:51:26 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.61 2019/06/19 12:52:41 isaki Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -615,12 +615,14 @@
        err = pad_add_block(sc, block, blksize);
        mutex_exit(&sc->sc_cond_lock);
        cv_broadcast(&sc->sc_condvar);
+       if (err)
+               return err;
 
        ms = blksize * 1000 / PADCHAN / (PADPREC / NBBY) / PADFREQ;
        DPRINTF("%s: callout ms=%d\n", __func__, ms);
        callout_reset(&sc->sc_pcallout, mstohz(ms), pad_done_output, sc);
 
-       return err;
+       return 0;
 }
 
 static int



Home | Main Index | Thread Index | Old Index