| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * bebob_maudio.c - a part of driver for BeBoB based devices |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2013-2014 Takashi Sakamoto |
|---|
| 5 | | - * |
|---|
| 6 | | - * Licensed under the terms of the GNU General Public License, version 2. |
|---|
| 7 | 6 | */ |
|---|
| 8 | 7 | |
|---|
| 9 | 8 | #include "./bebob.h" |
|---|
| .. | .. |
|---|
| 261 | 260 | struct special_params *params; |
|---|
| 262 | 261 | int err; |
|---|
| 263 | 262 | |
|---|
| 264 | | - params = kzalloc(sizeof(struct special_params), GFP_KERNEL); |
|---|
| 265 | | - if (params == NULL) |
|---|
| 263 | + params = devm_kzalloc(&bebob->card->card_dev, |
|---|
| 264 | + sizeof(struct special_params), GFP_KERNEL); |
|---|
| 265 | + if (!params) |
|---|
| 266 | 266 | return -ENOMEM; |
|---|
| 267 | 267 | |
|---|
| 268 | 268 | mutex_lock(&bebob->mutex); |
|---|