summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx/mlx.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-03-31 21:55:09 +0000
committersam <sam@FreeBSD.org>2005-03-31 21:55:09 +0000
commit1c0a6f68b0b2a7279ab9b39f2712aea251093866 (patch)
treeaaf8cccd5894fef277d3d3085bb4198524454faa /sys/dev/mlx/mlx.c
parentc5daf66e3905d8d518aac1c24bee4ff90b62b8a1 (diff)
downloadFreeBSD-src-1c0a6f68b0b2a7279ab9b39f2712aea251093866.zip
FreeBSD-src-1c0a6f68b0b2a7279ab9b39f2712aea251093866.tar.gz
fix potential null ptr deref
Noticed by: Coverity Prevent analysis tool
Diffstat (limited to 'sys/dev/mlx/mlx.c')
-rw-r--r--sys/dev/mlx/mlx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index 2f2144a..844a265 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -1542,7 +1542,7 @@ mlx_enquire(struct mlx_softc *sc, int command, size_t bufsize, void (* complete)
out:
/* we got a command, but nobody else will free it */
- if ((mc->mc_complete == NULL) && (mc != NULL))
+ if ((mc != NULL) && (mc->mc_complete == NULL))
mlx_releasecmd(mc);
/* we got an error, and we allocated a result */
if ((error != 0) && (result != NULL)) {
OpenPOWER on IntegriCloud