]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/rpmsg/qcom_glink_smem.c
rpmsg: glink: Switch to SPDX license identifier
[mirror_ubuntu-jammy-kernel.git] / drivers / rpmsg / qcom_glink_smem.c
index 892f2b92a4d854d5122887f21591184e18973b0f..2b5cf279095403f9ab54ffac2db194d4445b2503 100644 (file)
@@ -1,14 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2016, Linaro Ltd
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
 
 #include <linux/io.h>
@@ -217,6 +209,7 @@ struct qcom_glink *qcom_glink_smem_register(struct device *parent,
        ret = device_register(dev);
        if (ret) {
                pr_err("failed to register glink edge\n");
+               put_device(dev);
                return ERR_PTR(ret);
        }
 
@@ -299,7 +292,7 @@ struct qcom_glink *qcom_glink_smem_register(struct device *parent,
        return glink;
 
 err_put_dev:
-       put_device(dev);
+       device_unregister(dev);
 
        return ERR_PTR(ret);
 }