Message ID | 1595636246-15392-1-git-send-email-wang.yi59@zte.com.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | sh: sh4: Fix reference count leak in sq_dev_add | expand |
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index d432164..3fbd6fd 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -350,6 +350,8 @@ static int sq_dev_add(struct device *dev, struct subsys_interface *sif) "%s", "sq"); if (!error) kobject_uevent(kobj, KOBJ_ADD); + else + kobject_put(kobj); return error; }