| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * oxfw-spkr.c - a part of driver for OXFW970/971 based devices |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) Clemens Ladisch <clemens@ladisch.de> |
|---|
| 5 | | - * Licensed under the terms of the GNU General Public License, version 2. |
|---|
| 6 | 6 | */ |
|---|
| 7 | 7 | |
|---|
| 8 | 8 | #include "oxfw.h" |
|---|
| .. | .. |
|---|
| 270 | 270 | unsigned int i, first_ch; |
|---|
| 271 | 271 | int err; |
|---|
| 272 | 272 | |
|---|
| 273 | | - spkr = kzalloc(sizeof(struct fw_spkr), GFP_KERNEL); |
|---|
| 274 | | - if (spkr == NULL) |
|---|
| 273 | + spkr = devm_kzalloc(&oxfw->card->card_dev, sizeof(struct fw_spkr), |
|---|
| 274 | + GFP_KERNEL); |
|---|
| 275 | + if (!spkr) |
|---|
| 275 | 276 | return -ENOMEM; |
|---|
| 276 | 277 | oxfw->spec = spkr; |
|---|
| 277 | 278 | |
|---|