1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Be prepared that set_dumper() might fail even when resetting it or prefix

the call with (void) to document that we intentionally ignore the return
value - no way to handle an error in case of device disappearing.
This commit is contained in:
Pawel Jakub Dawidek 2014-09-30 12:00:50 +00:00
parent 7f5b50719b
commit 227f68edbb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272298

View File

@ -396,8 +396,7 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread
break;
case DIOCSKERNELDUMP:
if (*(u_int *)data != 0) {
set_dumper(NULL, NULL);
error = 0;
error = set_dumper(NULL, NULL);
break;
}
kd.offset = 0;
@ -616,7 +615,7 @@ g_dev_orphan(struct g_consumer *cp)
/* Reset any dump-area set on this device */
if (dev->si_flags & SI_DUMPDEV)
set_dumper(NULL, NULL);
(void)set_dumper(NULL, NULL);
/* Destroy the struct cdev *so we get no more requests */
destroy_dev_sched_cb(dev, g_dev_callback, cp);