Commit 3db91802 authored by malahal@us.ibm.com's avatar malahal@us.ibm.com Committed by David S. Miller

qlge: call ql_core_dump() only if dump memory was allocated.

Also changed a log message to indicate that memory was not allocated
instead of memory not available!
Signed-off-by: default avatarMalahal Naineni <malahal@us.ibm.com>
Acked-by: default avatarJitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3361dc95
...@@ -740,8 +740,8 @@ int ql_core_dump(struct ql_adapter *qdev, struct ql_mpi_coredump *mpi_coredump) ...@@ -740,8 +740,8 @@ int ql_core_dump(struct ql_adapter *qdev, struct ql_mpi_coredump *mpi_coredump)
int i; int i;
if (!mpi_coredump) { if (!mpi_coredump) {
netif_err(qdev, drv, qdev->ndev, "No memory available\n"); netif_err(qdev, drv, qdev->ndev, "No memory allocated\n");
return -ENOMEM; return -EINVAL;
} }
/* Try to get the spinlock, but dont worry if /* Try to get the spinlock, but dont worry if
......
...@@ -1274,7 +1274,7 @@ void ql_mpi_reset_work(struct work_struct *work) ...@@ -1274,7 +1274,7 @@ void ql_mpi_reset_work(struct work_struct *work)
return; return;
} }
if (!ql_core_dump(qdev, qdev->mpi_coredump)) { if (qdev->mpi_coredump && !ql_core_dump(qdev, qdev->mpi_coredump)) {
netif_err(qdev, drv, qdev->ndev, "Core is dumped!\n"); netif_err(qdev, drv, qdev->ndev, "Core is dumped!\n");
qdev->core_is_dumped = 1; qdev->core_is_dumped = 1;
queue_delayed_work(qdev->workqueue, queue_delayed_work(qdev->workqueue,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment