Return ENXIO on error.

Submitted by:	n_hibma
This commit is contained in:
KATO Takenori 2000-01-24 08:20:54 +00:00
parent 36cb9d91a7
commit 69d4b82b48
2 changed files with 4 additions and 4 deletions

View File

@ -1650,7 +1650,7 @@ sioattach(dev)
obufsize = 2048;
}
if ((obuf = malloc(obufsize * 2, M_DEVBUF, M_NOWAIT)) == NULL)
return (0);
return ENXIO;
bzero(obuf, obufsize * 2);
#endif
@ -1739,7 +1739,7 @@ sioattach(dev)
if (siosetwater(com, com->it_in.c_ispeed) != 0) {
enable_intr();
free(com, M_DEVBUF);
return (0);
return ENXIO;
}
enable_intr();
termioschars(&com->it_in);

View File

@ -1650,7 +1650,7 @@ sioattach(dev)
obufsize = 2048;
}
if ((obuf = malloc(obufsize * 2, M_DEVBUF, M_NOWAIT)) == NULL)
return (0);
return ENXIO;
bzero(obuf, obufsize * 2);
#endif
@ -1739,7 +1739,7 @@ sioattach(dev)
if (siosetwater(com, com->it_in.c_ispeed) != 0) {
enable_intr();
free(com, M_DEVBUF);
return (0);
return ENXIO;
}
enable_intr();
termioschars(&com->it_in);