| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2005-2014 Brocade Communications Systems, Inc. |
|---|
| 3 | 4 | * Copyright (c) 2014- QLogic Corporation. |
|---|
| .. | .. |
|---|
| 5 | 6 | * www.qlogic.com |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 10 | | - * under the terms of the GNU General Public License (GPL) Version 2 as |
|---|
| 11 | | - * published by the Free Software Foundation |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is distributed in the hope that it will be useful, but |
|---|
| 14 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 16 | | - * General Public License for more details. |
|---|
| 17 | 9 | */ |
|---|
| 18 | 10 | |
|---|
| 19 | 11 | #include <linux/debugfs.h> |
|---|
| .. | .. |
|---|
| 460 | 452 | if (!bfa_debugfs_root) { |
|---|
| 461 | 453 | bfa_debugfs_root = debugfs_create_dir("bfa", NULL); |
|---|
| 462 | 454 | atomic_set(&bfa_debugfs_port_count, 0); |
|---|
| 463 | | - if (!bfa_debugfs_root) { |
|---|
| 464 | | - printk(KERN_WARNING |
|---|
| 465 | | - "BFA debugfs root dir creation failed\n"); |
|---|
| 466 | | - goto err; |
|---|
| 467 | | - } |
|---|
| 468 | 455 | } |
|---|
| 469 | 456 | |
|---|
| 470 | 457 | /* Setup the pci_dev debugfs directory for the port */ |
|---|
| .. | .. |
|---|
| 472 | 459 | if (!port->port_debugfs_root) { |
|---|
| 473 | 460 | port->port_debugfs_root = |
|---|
| 474 | 461 | debugfs_create_dir(name, bfa_debugfs_root); |
|---|
| 475 | | - if (!port->port_debugfs_root) { |
|---|
| 476 | | - printk(KERN_WARNING |
|---|
| 477 | | - "bfa %s: debugfs root creation failed\n", |
|---|
| 478 | | - bfad->pci_name); |
|---|
| 479 | | - goto err; |
|---|
| 480 | | - } |
|---|
| 481 | 462 | |
|---|
| 482 | 463 | atomic_inc(&bfa_debugfs_port_count); |
|---|
| 483 | 464 | |
|---|
| .. | .. |
|---|
| 489 | 470 | port->port_debugfs_root, |
|---|
| 490 | 471 | port, |
|---|
| 491 | 472 | file->fops); |
|---|
| 492 | | - if (!bfad->bfad_dentry_files[i]) { |
|---|
| 493 | | - printk(KERN_WARNING |
|---|
| 494 | | - "bfa %s: debugfs %s creation failed\n", |
|---|
| 495 | | - bfad->pci_name, file->name); |
|---|
| 496 | | - goto err; |
|---|
| 497 | | - } |
|---|
| 498 | 473 | } |
|---|
| 499 | 474 | } |
|---|
| 500 | 475 | |
|---|
| 501 | | -err: |
|---|
| 502 | 476 | return; |
|---|
| 503 | 477 | } |
|---|
| 504 | 478 | |
|---|