We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9f9336 commit 4506000Copy full SHA for 4506000
drivers/base/auxiliary.c
@@ -231,6 +231,8 @@ EXPORT_SYMBOL_GPL(auxiliary_find_device);
231
int __auxiliary_driver_register(struct auxiliary_driver *auxdrv,
232
struct module *owner, const char *modname)
233
{
234
+ int ret;
235
+
236
if (WARN_ON(!auxdrv->probe) || WARN_ON(!auxdrv->id_table))
237
return -EINVAL;
238
@@ -246,7 +248,11 @@ int __auxiliary_driver_register(struct auxiliary_driver *auxdrv,
246
248
auxdrv->driver.bus = &auxiliary_bus_type;
247
249
auxdrv->driver.mod_name = modname;
250
- return driver_register(&auxdrv->driver);
251
+ ret = driver_register(&auxdrv->driver);
252
+ if (ret)
253
+ kfree(auxdrv->driver.name);
254
255
+ return ret;
256
}
257
EXPORT_SYMBOL_GPL(__auxiliary_driver_register);
258
0 commit comments