gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / drivers / net / wireless / ti / wl12xx / acx.c
blobfb830d01b8ff23d7c8805bb64ffb0d9e642800cf
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * This file is part of wl12xx
5 * Copyright (C) 2008-2009 Nokia Corporation
6 * Copyright (C) 2011 Texas Instruments Inc.
7 */
9 #include "../wlcore/cmd.h"
10 #include "../wlcore/debug.h"
11 #include "../wlcore/acx.h"
13 #include "acx.h"
15 int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap)
17 struct wl1271_acx_host_config_bitmap *bitmap_conf;
18 int ret;
20 bitmap_conf = kzalloc(sizeof(*bitmap_conf), GFP_KERNEL);
21 if (!bitmap_conf) {
22 ret = -ENOMEM;
23 goto out;
26 bitmap_conf->host_cfg_bitmap = cpu_to_le32(host_cfg_bitmap);
28 ret = wl1271_cmd_configure(wl, ACX_HOST_IF_CFG_BITMAP,
29 bitmap_conf, sizeof(*bitmap_conf));
30 if (ret < 0) {
31 wl1271_warning("wl1271 bitmap config opt failed: %d", ret);
32 goto out;
35 out:
36 kfree(bitmap_conf);
38 return ret;