Author: ian Date: Sat Apr 7 21:31:09 2018 New Revision: 332258 URL: https://svnweb.freebsd.org/changeset/base/332258
Log: Don't check for impossible NULL return from malloc(..., M_WAITOK). Modified: head/sys/dev/spibus/spigen.c Modified: head/sys/dev/spibus/spigen.c ============================================================================== --- head/sys/dev/spibus/spigen.c Sat Apr 7 21:25:29 2018 (r332257) +++ head/sys/dev/spibus/spigen.c Sat Apr 7 21:31:09 2018 (r332258) @@ -242,15 +242,9 @@ spigen_transfer(struct cdev *cdev, struct spigen_trans #endif transfer.tx_cmd = transfer.rx_cmd = malloc(st->st_command.iov_len, M_DEVBUF, M_WAITOK); - if (transfer.tx_cmd == NULL) - return (ENOMEM); if (st->st_data.iov_len > 0) { transfer.tx_data = transfer.rx_data = malloc(st->st_data.iov_len, M_DEVBUF, M_WAITOK); - if (transfer.tx_data == NULL) { - free(transfer.tx_cmd, M_DEVBUF); - return (ENOMEM); - } } else transfer.tx_data = transfer.rx_data = NULL; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"