- initial oa to null in llog_lvfs_create, avoids crashing
- in llog test 1a, don't try to close if the open failed
- 'lctl modules' hook for llog_test
{
struct llog_handle *llh;
char name[10];
- int rc, err;
+ int rc;
ENTRY;
CERROR("1a: create a log with a name\n");
sprintf(name, "%x", llog_test_rand);
rc = llog_create(obd, &llh, name);
- if (rc)
+ if (rc) {
CERROR("1a: llog_create with name %s failed: %d\n", name, rc);
+ RETURN(rc);
+ }
CERROR("1b: close newly-created log\n");
- err = llog_close(llh);
- if (err)
- CERROR("1b: close log %s failed: %d\n", name, err);
- if (!rc)
- rc = err;
+ rc = llog_close(llh);
+ if (rc)
+ CERROR("1b: close log %s failed: %d\n", name, rc);
RETURN(rc);
}