lkml.org 
[lkml]   [2023]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy
Date

Hans de Goede <hdegoede@redhat.com> writes:

> Thanks this change looks good to me.
>
>> @@ -247,8 +249,10 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc,
>> if (IS_ERR(gpio))
>> return PTR_ERR(gpio);
>>
>> - gpiod_set_value_cansleep(gpio, 1);
>> - gpiod_put(gpio);
>> + if (gpio) {
>> + gpiod_set_value_cansleep(gpio, 1);
>> + gpiod_put(gpio);
>> + }
>>
>> gpio = gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW);
>> if (IS_ERR(gpio))
>
> But this is not necessary both gpiod_set_value_cansleep() and gpiod_put() handle being called with NULL gracefully (so they handle NULL returned by gpiod_get_optional() without issues) .
>
> Can you please post a version 2 of this patch dropping this unnecessary change?

V2 posted: https://lore.kernel.org/linux-usb/20230726184555.218091-2-gratian.crisan@ni.com/

Thanks,
Gratian

\
 
 \ /
  Last update: 2023-07-26 21:04    [W:0.033 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site