Remove NULL check after M_WAITOK allocations from mfi(4).
MFC after: 1 month Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
256a4cb9d7
commit
b00039f739
@ -3230,10 +3230,6 @@ mfi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td
|
||||
(cm->cm_flags & (MFI_CMD_DATAIN | MFI_CMD_DATAOUT))) {
|
||||
cm->cm_data = data = malloc(cm->cm_len, M_MFIBUF,
|
||||
M_WAITOK | M_ZERO);
|
||||
if (cm->cm_data == NULL) {
|
||||
device_printf(sc->mfi_dev, "Malloc failed\n");
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
cm->cm_data = 0;
|
||||
}
|
||||
@ -3527,10 +3523,6 @@ mfi_linux_ioctl_int(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct
|
||||
(cm->cm_flags & (MFI_CMD_DATAIN | MFI_CMD_DATAOUT))) {
|
||||
cm->cm_data = data = malloc(cm->cm_len, M_MFIBUF,
|
||||
M_WAITOK | M_ZERO);
|
||||
if (cm->cm_data == NULL) {
|
||||
device_printf(sc->mfi_dev, "Malloc failed\n");
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
cm->cm_data = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user