diff options
Diffstat (limited to 'fs/pstore/platform.c')
-rw-r--r-- | fs/pstore/platform.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index f146d89179bf..9ec22d3b4293 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -207,8 +207,7 @@ void pstore_get_records(int quiet) return; mutex_lock(&psi->read_mutex); - rc = psi->open(psi); - if (rc) + if (psi->open && psi->open(psi)) goto out; while ((size = psi->read(&id, &type, &time, &buf, psi)) > 0) { @@ -219,7 +218,8 @@ void pstore_get_records(int quiet) if (rc && (rc != -EEXIST || !quiet)) failed++; } - psi->close(psi); + if (psi->close) + psi->close(psi); out: mutex_unlock(&psi->read_mutex); |