Remove a pointless check.

This commit is contained in:
Poul-Henning Kamp 2004-07-10 15:38:27 +00:00
parent ee38feb205
commit 72118ea9fd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131896

View File

@ -86,8 +86,6 @@ led_write(struct cdev *dev, struct uio *uio, int ioflag)
if (uio->uio_resid > 512)
return (EINVAL);
s2 = s = malloc(uio->uio_resid + 1, M_DEVBUF, M_WAITOK);
if (s == NULL)
return (ENOMEM);
s[uio->uio_resid] = '\0';
error = uiomove(s, uio->uio_resid, uio);
if (error) {