diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index 8e86a00222da..7e4cb443894a 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -2075,8 +2075,8 @@ mlx_user_command(struct mlx_softc *sc, struct mlx_usercommand *mu) goto out; } MLX_IO_UNLOCK(sc); - if (((kbuf = malloc(mu->mu_datasize, M_DEVBUF, M_WAITOK)) == NULL) || - (error = copyin(mu->mu_buf, kbuf, mu->mu_datasize))) { + kbuf = malloc(mu->mu_datasize, M_DEVBUF, M_WAITOK); + if ((error = copyin(mu->mu_buf, kbuf, mu->mu_datasize))) { MLX_IO_LOCK(sc); goto out; }