提交 dd3b9a44 编写于 作者: V Vladimir Zapolskiy 提交者: Linus Walleij

gpiolib: remove a redundant check in gpiod_to_chip()

This non-functional change slightly simplifies the implementation
of gpiod_to_chip() function.
Signed-off-by: NVladimir Zapolskiy <vz@mleia.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 30322bcf
......@@ -161,7 +161,7 @@ EXPORT_SYMBOL_GPL(desc_to_gpio);
*/
struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
{
if (!desc || !desc->gdev || !desc->gdev->chip)
if (!desc || !desc->gdev)
return NULL;
return desc->gdev->chip;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册