filemon_ioctl: Handle error from devfs_get_cdevpriv(9).

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-01-27 21:12:18 +00:00
parent 13f727c862
commit e8c87a09dc

View File

@ -143,7 +143,8 @@ filemon_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag __unused,
cap_rights_t rights;
#endif
devfs_get_cdevpriv((void **) &filemon);
if ((error = devfs_get_cdevpriv((void **) &filemon)) != 0)
return (error);
switch (cmd) {
/* Set the output file descriptor. */