lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <875y66h4v2.fsf@ni.com>
Date:   Wed, 26 Jul 2023 14:00:21 -0500
From:   Gratian Crisan <gratian.crisan@...com>
To:     Hans de Goede <hdegoede@...hat.com>
Cc:     Thinh.Nguyen@...opsys.com, gregkh@...uxfoundation.org,
        felipe.balbi@...ux.intel.com, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, gratian@...il.com
Subject: Re: [PATCH] usb: dwc3: pci: skip BYT GPIO lookup table for
 hardwired phy


Hans de Goede <hdegoede@...hat.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ