Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 448519e1 authored by Maria Yu's avatar Maria Yu Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: Fix for match NULL handle in msm_pdev_probe



Mem abort happened when match is NULL in msm_pdev_probe
processing. Fix it by gracefully checking.

Change-Id: Ie66b5bbad39dc180366585d51c9ac4890633b2c6
Signed-off-by: default avatarMaria Yu <aiquny@codeaurora.org>
parent caad6561
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -1973,6 +1973,9 @@ static int msm_pdev_probe(struct platform_device *pdev)
	if (ret)
		return ret;

	if (!match)
		return -ENODEV;

	pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
	return component_master_add_with_match(&pdev->dev, &msm_drm_ops, match);
}