Re: [PATCH] [ARM] pata_pxa: Fix null-ptr-deref in pxa_ata_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



…
> Add NULL check after devm_ioremap() to prevent this issue.

Can a summary phrase like “Prevent null pointer dereference in pxa_ata_probe()”
be a bit nicer?


…
> +++ b/drivers/ata/pata_pxa.c
> @@ -223,11 +223,16 @@ static int pxa_ata_probe(struct platform_device *pdev)
>
>  	ap->ioaddr.cmd_addr	= devm_ioremap(&pdev->dev, cmd_res->start,
>  						resource_size(cmd_res));
> +	if (!ap->ioaddr.cmd_addr)
> +		return -ENOMEM;

Can a blank line be desirable after such a statement?

Regards,
Markus





[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux