| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * oxfw-scs1x.c - a part of driver for OXFW970/971 based devices |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) Clemens Ladisch <clemens@ladisch.de> |
|---|
| 5 | 6 | * Copyright (c) 2015 Takashi Sakamoto <o-takashi@sakamocchi.jp> |
|---|
| 6 | | - * |
|---|
| 7 | | - * Licensed under the terms of the GNU General Public License, version 2. |
|---|
| 8 | 7 | */ |
|---|
| 9 | 8 | |
|---|
| 10 | 9 | #include "oxfw.h" |
|---|
| .. | .. |
|---|
| 372 | 371 | struct fw_scs1x *scs; |
|---|
| 373 | 372 | int err; |
|---|
| 374 | 373 | |
|---|
| 375 | | - scs = kzalloc(sizeof(struct fw_scs1x), GFP_KERNEL); |
|---|
| 376 | | - if (scs == NULL) |
|---|
| 374 | + scs = devm_kzalloc(&oxfw->card->card_dev, sizeof(struct fw_scs1x), |
|---|
| 375 | + GFP_KERNEL); |
|---|
| 376 | + if (!scs) |
|---|
| 377 | 377 | return -ENOMEM; |
|---|
| 378 | 378 | scs->fw_dev = fw_parent_device(oxfw->unit); |
|---|
| 379 | 379 | oxfw->spec = scs; |
|---|