Move the null pointer check to before the pointer is dereferenced.
Change-Id: I9983dae8802706c1efeff8a507a001b649572686
Reviewed-on: http://gerrit.openafs.org/8882
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
int xflags;
afs_int32 code = 0, error = 0, rc = 0;
+ if (!info || !tape)
+ ERROR_EXIT(BUTM_BADARGUMENT);
+
if (info->debug)
printf("butm: Mount tape drive\n");
POLL();
info->error = 0;
- if (!info || !tape)
- ERROR_EXIT(BUTM_BADARGUMENT);
if (info->structVersion != BUTM_MAJORVERSION)
ERROR_EXIT(BUTM_OLDINTERFACE);
if (info->tmRock)