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>] [day] [month] [year] [list]
Date:   Tue, 14 Jul 2020 10:48:18 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Clark Wang <xiaoning.wang@....com>, linux-spi@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH 2/5] spi: lpspi: add NULL check when probe device

…
> +++ b/drivers/spi/spi-fsl-lpspi.c
> @@ -841,6 +841,11 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
>  	u32 temp;
>  	bool is_slave;
>
> +	if (!np && !lpspi_platform_info) {
> +		dev_err(&pdev->dev, "can't get the platform data\n");
> +		return -EINVAL;
> +	}
…

How do you think about to combine these null pointer checks by the logical
operator “or” instead of “and”?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ