提交 969affff 编写于 作者: J Jean-Christophe PLAGNIOL-VILLARD 提交者: Greg Kroah-Hartman

USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled

to ensure gpio_is_valid return false
Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 e5dcd531
......@@ -2015,6 +2015,9 @@ static int __init usba_udc_probe(struct platform_device *pdev)
} else {
disable_irq(gpio_to_irq(udc->vbus_pin));
}
} else {
/* gpio_request fail so use -EINVAL for gpio_is_valid */
ubc->vbus_pin = -EINVAL;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册