mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
PCI: rcar: Verify that mem_res is 64K-aligned
The lower 16 bits of the address, which is managed by mem_res, need to be zero. Check the address to verify this. Signed-off-by: Nobuhiro Iwamatsu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Simon Horman <[email protected]>
This commit is contained in:
parent
ecd06305c9
commit
7a27db23a3
1 changed files with 3 additions and 0 deletions
|
|
@ -301,6 +301,9 @@ static int rcar_pci_probe(struct platform_device *pdev)
|
|||
if (!mem_res || !mem_res->start)
|
||||
return -ENODEV;
|
||||
|
||||
if (mem_res->start & 0xFFFF)
|
||||
return -EINVAL;
|
||||
|
||||
priv = devm_kzalloc(&pdev->dev,
|
||||
sizeof(struct rcar_pci_priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
|
|
|
|||
Loading…
Reference in a new issue