uio: msm_sharedmem: add pr_err in alloc memory failure
show err in alloc memory failure path of probe. Change-Id: I2a68281edbecabc4ee7c6adcb30d2542664ceecc Signed-off-by: Mao Wang <quic_maow@quicinc.com> Signed-off-by: Kassey Li <quic_yingangl@quicinc.com>
This commit is contained in:
parent
437e4addec
commit
52c72101a2
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#define DRIVER_NAME "msm_sharedmem"
|
||||
@ -168,8 +169,10 @@ static int msm_sharedmem_probe(struct platform_device *pdev)
|
||||
|
||||
shared_mem = dma_alloc_coherent(&pdev->dev, shared_mem_tot_sz,
|
||||
&shared_mem_pyhsical, GFP_KERNEL);
|
||||
if (shared_mem == NULL)
|
||||
if (shared_mem == NULL) {
|
||||
pr_err("failed to alloc memory %d\n", shared_mem_tot_sz);
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (guard_memory)
|
||||
shared_mem_pyhsical += SZ_4K;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user