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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210429144244.GE1981@kadam>
Date:   Thu, 29 Apr 2021 17:42:44 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Phil Reid <preid@...ctromag.com.au>,
        dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v3 3/4] staging: fbtft: Don't spam logs when probe is
 deferred

On Wed, Apr 28, 2021 at 04:04:14PM +0300, Andy Shevchenko wrote:
> @@ -75,20 +75,16 @@ static int fbtft_request_one_gpio(struct fbtft_par *par,
>  				  struct gpio_desc **gpiop)
>  {
>  	struct device *dev = par->info->device;
> -	int ret = 0;
>  
>  	*gpiop = devm_gpiod_get_index_optional(dev, name, index,
>  					       GPIOD_OUT_LOW);
> -	if (IS_ERR(*gpiop)) {
> -		ret = PTR_ERR(*gpiop);
> -		dev_err(dev,
> -			"Failed to request %s GPIO: %d\n", name, ret);
> -		return ret;
> -	}
> +	if (IS_ERR(*gpiop))
> +		dev_err_probe(dev, PTR_ERR(*gpiop), "Failed to request %s GPIO\n", name);

This should be a return statement:

		return dev_err_probe(dev, PTR_ERR(*gpiop), "Failed to request %s GPIO\n", name);

> +
>  	fbtft_par_dbg(DEBUG_REQUEST_GPIOS, par, "%s: '%s' GPIO\n",
>  		      __func__, name);
>  
> -	return ret;
> +	return 0;
>  }

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ