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: <17a1fccd-0ac3-f257-dec9-228b33a18cfa@web.de>
Date:   Thu, 19 Sep 2019 12:50:28 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Miquel Raynal <miquel.raynal@...tlin.com>,
        linux-mtd@...ts.infradead.org
Cc:     Allison Randal <allison@...utok.net>,
        Armijn Hemel <armijn@...ldur.nl>,
        Brian Norris <computersforpeace@...il.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Lee Jones <lee.jones@...aro.org>,
        Marek Vasut <marek.vasut@...il.com>,
        Richard Weinberger <richard@....at>,
        Thomas Gleixner <tglx@...utronix.de>,
        Vignesh Raghavendra <vigneshr@...com>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Himanshu Jha <himanshujha199640@...il.com>
Subject: Re: [PATCH] mtd: st_spi_fsm: Use devm_platform_ioremap_resource() in
 stfsm_probe()

>> +++ b/drivers/mtd/devices/st_spi_fsm.c
>> @@ -2034,13 +2034,7 @@ static int stfsm_probe(struct platform_device *pdev)
>>
>>  	platform_set_drvdata(pdev, fsm);
>>
>> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> -	if (!res) {
>> -		dev_err(&pdev->dev, "Resource not found\n");
>> -		return -ENODEV;
>> -	}
>> -
>> -	fsm->base = devm_ioremap_resource(&pdev->dev, res);
>> +	fsm->base = devm_platform_ioremap_resource(pdev, 0);
>>  	if (IS_ERR(fsm->base)) {
>>  		dev_err(&pdev->dev,
>>  			"Failed to reserve memory region %pR\n", res);
>> --
>> 2.23.0
>>
>
>
> Is this even compiled tested? 'res' is not initialized anymore so you
> can't use it in the error trace. I suppose you should even drop it from
> the stack parameters.

Would you accept to reduce the error message another bit?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ