aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-aspeed.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-aspeed.c')
-rw-r--r--drivers/gpio/gpio-aspeed.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index ccea609676ee..4ca436e66bdb 100644
--- a/drivers/gpio/gpio-aspeed.c
+++ b/drivers/gpio/gpio-aspeed.c
@@ -646,6 +646,9 @@ static int enable_debounce(struct gpio_chip *chip, unsigned int offset,
646 int rc; 646 int rc;
647 int i; 647 int i;
648 648
649 if (!gpio->clk)
650 return -EINVAL;
651
649 rc = usecs_to_cycles(gpio, usecs, &requested_cycles); 652 rc = usecs_to_cycles(gpio, usecs, &requested_cycles);
650 if (rc < 0) { 653 if (rc < 0) {
651 dev_warn(chip->parent, "Failed to convert %luus to cycles at %luHz: %d\n", 654 dev_warn(chip->parent, "Failed to convert %luus to cycles at %luHz: %d\n",