summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libata-eh.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index ecbb8e90cb8d..d94359a24d41 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2137,9 +2137,14 @@ int ata_eh_reset(struct ata_link *link, int classify,
if (hardreset) {
reset = hardreset;
ehc->i.action = ATA_EH_HARDRESET;
- } else {
+ } else if (softreset) {
reset = softreset;
ehc->i.action = ATA_EH_SOFTRESET;
+ } else {
+ ata_link_printk(link, KERN_ERR, "BUG: no reset method, "
+ "please report to linux-ide@vger.kernel.org\n");
+ dump_stack();
+ return -EINVAL;
}
if (prereset) {
OpenPOWER on IntegriCloud