[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8cd787ae-85ae-4187-9009-d3596b120186@kadam.mountain>
Date: Thu, 20 Jul 2023 08:37:03 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Umang Jain <umang.jain@...asonboard.com>
Cc: linux-staging@...ts.linux.dev,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, stefan.wahren@...e.com,
gregkh@...uxfoundation.org, f.fainelli@...il.com,
athierry@...hat.com, error27@...il.com,
dave.stevenson@...pberrypi.com, kieran.bingham@...asonboard.com,
laurent.pinchart@...asonboard.com
Subject: Re: [PATCH v9 2/5] staging: vc04_services: vchiq_arm: Register
vchiq_bus_type
On Wed, Jul 19, 2023 at 10:14:24PM +0530, Umang Jain wrote:
> @@ -1870,6 +1872,12 @@ static int __init vchiq_driver_init(void)
> {
> int ret;
>
> + ret = bus_register(&vchiq_bus_type);
> + if (ret) {
> + pr_err("Failed to register %s\n", vchiq_bus_type.name);
> + return ret;
> + }
> +
> ret = platform_driver_register(&vchiq_driver);
> if (ret)
> pr_err("Failed to register vchiq driver\n");
Call bus_unregister() if platform_driver_register() fails. Otherwise
it probably leads to a use after free or something bad.
> @@ -1880,6 +1888,7 @@ module_init(vchiq_driver_init);
regards,
dan carpenter
Powered by blists - more mailing lists