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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 26 Jul 2019 12:50:38 +0200
From:   Cezary Rojewski <cezary.rojewski@...el.com>
To:     Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        tiwai@...e.de, broonie@...nel.org, vkoul@...nel.org,
        gregkh@...uxfoundation.org, jank@...ence.com,
        srinivas.kandagatla@...aro.org, slawomir.blauciak@...el.com,
        Sanyog Kale <sanyog.r.kale@...el.com>
Subject: Re: [RFC PATCH 33/40] soundwire: intel: Add basic power management
 support

On 2019-07-26 01:40, Pierre-Louis Bossart wrote:
> +static int intel_resume(struct device *dev)
> +{
> +	struct sdw_intel *sdw;
> +	int ret;
> +
> +	sdw = dev_get_drvdata(dev);
> +
> +	ret = intel_init(sdw);
> +	if (ret) {
> +		dev_err(dev, "%s failed: %d", __func__, ret);
> +		return ret;
> +	}
> +
> +	sdw_cdns_enable_interrupt(&sdw->cdns);
> +
> +	return ret;
> +}
> +
> +#endif

Suggestion: the local declaration + initialization via dev_get_drvdata() 
are usually combined.

Given the upstream declaration of _enable_interrupt, it does return 
error code/ success. Given current flow, if function gets to 
_enable_interrupt call, ret is already set to 0. Returning 
sdw_cds_enable_interrupt() directly would both simplify the definition 
and prevent status loss.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ