Re: [PATCH v2 1/9] serial: core: only get RS485 termination GPIO if supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 03.07.22 20:27, Andy Shevchenko wrote:
> On Sun, Jul 3, 2022 at 7:02 PM Lino Sanfilippo <LinoSanfilippo@xxxxxx> wrote:
>>
>> From: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx>
>>
>> In uart_get_rs485_mode() only try to get a termination GPIO if RS485 bus
>> termination is supported by the driver. This prevents from allocating
>> and holding a GPIO descriptor for the drivers lifetimg that will never be
>
> lifetiming
>
>> used.
>
> ...
>
>>         port->rs485_term_gpio = devm_gpiod_get_optional(dev, "rs485-term",
>>                                                         GPIOD_OUT_LOW);
>> +
>> +       if (port->rs485_term_gpio &&
>
> This check is incorrect. Either you need to move that after error
> checking (that's what I personally prefer), or use !IS_ERR_OR_NULL().
>

Right, a stupid mistake. I will fix this, thanks!

Regards,
Lino




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux