lkml.org 
[lkml]   [2020]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/8] PCI: aardvark: Add support for issuing PERST via GPIO
On Wed, 15 Apr 2020 18:03:46 +0200
Pali Rohár <pali@kernel.org> wrote:

> + if (IS_ERR(pcie->reset_gpio)) {
> + if (PTR_ERR(pcie->reset_gpio) == -ENOENT) {
> + pcie->reset_gpio = NULL;

this assignment is redundant, the variable is already NULL, such
structures are zeroed after allocation

> + } else {
> + if (PTR_ERR(pcie->reset_gpio) != -EPROBE_DEFER)
> + dev_err(dev, "Failed to retrieve reset GPIO (%ld)\n",
> + PTR_ERR(pcie->reset_gpio));
> + return PTR_ERR(pcie->reset_gpio);
> + }
> + }

\
 
 \ /
  Last update: 2020-04-19 05:25    [W:0.135 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site