iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IPMMU-VMSA: Delete an error message for a failed memory allocation in ipmmu_probe()
@ 2018-01-19 21:30 SF Markus Elfring
  0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2018-01-19 21:30 UTC (permalink / raw)
  To: iommu, Jörg Rödel; +Cc: LKML, kernel-janitors, Magnus Damm

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 19 Jan 2018 22:22:38 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/iommu/ipmmu-vmsa.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index 8dce3a9de9d8..1f78d60f2029 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -949,10 +949,8 @@ static int ipmmu_probe(struct platform_device *pdev)
 	int ret;
 
 	mmu = devm_kzalloc(&pdev->dev, sizeof(*mmu), GFP_KERNEL);
-	if (!mmu) {
-		dev_err(&pdev->dev, "cannot allocate device data\n");
+	if (!mmu)
 		return -ENOMEM;
-	}
 
 	mmu->dev = &pdev->dev;
 	mmu->num_utlbs = 32;
-- 
2.15.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-19 21:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-19 21:30 [PATCH] IPMMU-VMSA: Delete an error message for a failed memory allocation in ipmmu_probe() SF Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).