ata: sata_mv:- Handle return value of devm_ioremap.
commit1a472e4c2b9c5d60a9c172be6c7979c1f8ba5587
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 12 Dec 2016 17:43:27 +0000 (12 23:13 +0530)
committerSasha Levin <alexander.levin@verizon.com>
Mon, 6 Mar 2017 22:29:13 +0000 (6 17:29 -0500)
treeff3cdd17613265418ef2353ade192bf5a3600b74
parent87f674247089cbe8250f00d431885618e790fe83
ata: sata_mv:- Handle return value of devm_ioremap.

[ Upstream commit 064c3db9c564cc5be514ac21fb4aa26cc33db746 ]

Here, If devm_ioremap will fail. It will return NULL.
Then hpriv->base = NULL - 0x20000; Kernel can run into
a NULL-pointer dereference. This error check will avoid
NULL pointer dereference.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/ata/sata_mv.c