n64joy.c (009ef05f98129aa91c62c3baab859ba593a15bb2) | n64joy.c (2d8aaa1720c6128ce263a2afcd3f8ee2e5551af8) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Support for the four N64 controllers. 4 * 5 * Copyright (c) 2021 Lauri Kasanen 6 */ 7 8#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt --- 238 unchanged lines hidden (view full) --- 247 u32 i, j, found = 0; 248 249 priv = kzalloc(sizeof(struct n64joy_priv), GFP_KERNEL); 250 if (!priv) 251 return -ENOMEM; 252 mutex_init(&priv->n64joy_mutex); 253 254 priv->reg_base = devm_platform_ioremap_resource(pdev, 0); | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Support for the four N64 controllers. 4 * 5 * Copyright (c) 2021 Lauri Kasanen 6 */ 7 8#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt --- 238 unchanged lines hidden (view full) --- 247 u32 i, j, found = 0; 248 249 priv = kzalloc(sizeof(struct n64joy_priv), GFP_KERNEL); 250 if (!priv) 251 return -ENOMEM; 252 mutex_init(&priv->n64joy_mutex); 253 254 priv->reg_base = devm_platform_ioremap_resource(pdev, 0); |
255 if (!priv->reg_base) { 256 err = -EINVAL; | 255 if (IS_ERR(priv->reg_base)) { 256 err = PTR_ERR(priv->reg_base); |
257 goto fail; 258 } 259 260 /* The controllers are not hotpluggable, so we can scan in init */ 261 n64joy_exec_pif(priv, scandata); 262 263 data = (struct joydata *) priv->si_buf; 264 --- 81 unchanged lines hidden --- | 257 goto fail; 258 } 259 260 /* The controllers are not hotpluggable, so we can scan in init */ 261 n64joy_exec_pif(priv, scandata); 262 263 data = (struct joydata *) priv->si_buf; 264 --- 81 unchanged lines hidden --- |