.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2014-2015 Hisilicon Limited. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License as published by |
---|
6 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
7 | | - * (at your option) any later version. |
---|
8 | 4 | */ |
---|
9 | 5 | |
---|
10 | 6 | #include <linux/dma-mapping.h> |
---|
.. | .. |
---|
274 | 270 | hnae_fini_ring(&q->rx_ring); |
---|
275 | 271 | } |
---|
276 | 272 | |
---|
277 | | -/** |
---|
| 273 | +/* |
---|
278 | 274 | * ae_chain - define ae chain head |
---|
279 | 275 | */ |
---|
280 | 276 | static RAW_NOTIFIER_HEAD(ae_chain); |
---|
.. | .. |
---|
423 | 419 | hdev->cls_dev.release = hnae_release; |
---|
424 | 420 | (void)dev_set_name(&hdev->cls_dev, "hnae%d", hdev->id); |
---|
425 | 421 | ret = device_register(&hdev->cls_dev); |
---|
426 | | - if (ret) |
---|
| 422 | + if (ret) { |
---|
| 423 | + put_device(&hdev->cls_dev); |
---|
427 | 424 | return ret; |
---|
| 425 | + } |
---|
428 | 426 | |
---|
429 | 427 | __module_get(THIS_MODULE); |
---|
430 | 428 | |
---|
.. | .. |
---|
442 | 440 | |
---|
443 | 441 | /** |
---|
444 | 442 | * hnae_ae_unregister - unregisters a HNAE AE engine |
---|
445 | | - * @cdev: the device to unregister |
---|
| 443 | + * @hdev: the device to unregister |
---|
446 | 444 | */ |
---|
447 | 445 | void hnae_ae_unregister(struct hnae_ae_dev *hdev) |
---|
448 | 446 | { |
---|