.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* IBM POWER Barrier Synchronization Register Driver |
---|
2 | 3 | * |
---|
3 | 4 | * Copyright IBM Corporation 2008 |
---|
4 | 5 | * |
---|
5 | 6 | * Author: Sonny Rao <sonnyrao@us.ibm.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License as published by |
---|
9 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
10 | | - * (at your option) any later version. |
---|
11 | | - * |
---|
12 | | - * This program is distributed in the hope that it will be useful, |
---|
13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | | - * GNU General Public License for more details. |
---|
16 | | - * |
---|
17 | | - * You should have received a copy of the GNU General Public License |
---|
18 | | - * along with this program; if not, write to the Free Software |
---|
19 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
20 | 7 | */ |
---|
21 | 8 | |
---|
22 | 9 | #include <linux/kernel.h> |
---|
.. | .. |
---|
30 | 17 | #include <linux/list.h> |
---|
31 | 18 | #include <linux/mm.h> |
---|
32 | 19 | #include <linux/slab.h> |
---|
33 | | -#include <asm/pgtable.h> |
---|
34 | 20 | #include <asm/io.h> |
---|
35 | 21 | |
---|
36 | 22 | /* |
---|
.. | .. |
---|
147 | 133 | return 0; |
---|
148 | 134 | } |
---|
149 | 135 | |
---|
150 | | -static int bsr_open(struct inode * inode, struct file * filp) |
---|
| 136 | +static int bsr_open(struct inode *inode, struct file *filp) |
---|
151 | 137 | { |
---|
152 | 138 | struct cdev *cdev = inode->i_cdev; |
---|
153 | 139 | struct bsr_dev *dev = container_of(cdev, struct bsr_dev, bsr_cdev); |
---|
.. | .. |
---|
322 | 308 | goto out_err_2; |
---|
323 | 309 | } |
---|
324 | 310 | |
---|
325 | | - if ((ret = bsr_create_devs(np)) < 0) { |
---|
| 311 | + ret = bsr_create_devs(np); |
---|
| 312 | + if (ret < 0) { |
---|
326 | 313 | np = NULL; |
---|
327 | 314 | goto out_err_3; |
---|
328 | 315 | } |
---|