summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorAnson Huang <Anson.Huang@nxp.com>2018-11-03 12:33:11 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:35:03 +0800
commit086b71e4470e99945711155aa1c7df88ae645ebf (patch)
treec80482698cc0dd8601105c63a5339c69ffd04ebc /drivers/soc
parent0c8eeff92480683c9dbc2dc5adc7d10d3c86a089 (diff)
MLK-20213-3 soc: imx: fix coverity issue
This patch fixes coverity issue of "unchecked return value". Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Bai Ping <ping.bai@nxp.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/imx/soc-imx8.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/soc/imx/soc-imx8.c b/drivers/soc/imx/soc-imx8.c
index 331f93454a8b..5a5215dfb746 100644
--- a/drivers/soc/imx/soc-imx8.c
+++ b/drivers/soc/imx/soc-imx8.c
@@ -301,6 +301,7 @@ static int __init imx8_soc_init(void)
struct soc_device_attribute *soc_dev_attr;
struct soc_device *soc_dev;
u32 soc_rev;
+ int ret;
soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
if (!soc_dev_attr)
@@ -324,7 +325,11 @@ static int __init imx8_soc_init(void)
if (IS_ERR(soc_dev))
goto free_rev;
- device_create_file(soc_device_to_device(soc_dev), &imx8_uid);
+ ret = device_create_file(soc_device_to_device(soc_dev), &imx8_uid);
+ if (ret) {
+ pr_err("could not register sysfs entry\n");
+ return ret;
+ }
if (of_machine_is_compatible("fsl,imx8mq"))
imx8mq_noc_init();