mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using
git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'
to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.
Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.
For the same reason the 'flex' versions will be done as a separate
conversion.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -306,7 +306,7 @@ int gb_cap_connection_init(struct gb_connection *connection)
|
||||
if (!connection)
|
||||
return 0;
|
||||
|
||||
cap = kzalloc_obj(*cap, GFP_KERNEL);
|
||||
cap = kzalloc_obj(*cap);
|
||||
if (!cap)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@ static int gb_bootrom_probe(struct gb_bundle *bundle,
|
||||
if (cport_desc->protocol_id != GREYBUS_PROTOCOL_BOOTROM)
|
||||
return -ENODEV;
|
||||
|
||||
bootrom = kzalloc_obj(*bootrom, GFP_KERNEL);
|
||||
bootrom = kzalloc_obj(*bootrom);
|
||||
if (!bootrom)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -791,7 +791,7 @@ static int gb_camera_op_configure_streams(void *priv, unsigned int *nstreams,
|
||||
if (gb_nstreams > GB_CAMERA_MAX_STREAMS)
|
||||
return -EINVAL;
|
||||
|
||||
gb_streams = kzalloc_objs(*gb_streams, gb_nstreams, GFP_KERNEL);
|
||||
gb_streams = kzalloc_objs(*gb_streams, gb_nstreams);
|
||||
if (!gb_streams)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -932,7 +932,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct gb_camera *gcam,
|
||||
return ret;
|
||||
|
||||
/* For each stream to configure parse width, height and format */
|
||||
streams = kzalloc_objs(*streams, nstreams, GFP_KERNEL);
|
||||
streams = kzalloc_objs(*streams, nstreams);
|
||||
if (!streams)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1244,7 +1244,7 @@ static int gb_camera_probe(struct gb_bundle *bundle,
|
||||
if (!mgmt_cport_id || !data_cport_id)
|
||||
return -ENODEV;
|
||||
|
||||
gcam = kzalloc_obj(*gcam, GFP_KERNEL);
|
||||
gcam = kzalloc_obj(*gcam);
|
||||
if (!gcam)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
|
||||
u16 cport_id;
|
||||
u8 protocol_id;
|
||||
|
||||
fw_core = kzalloc_obj(*fw_core, GFP_KERNEL);
|
||||
fw_core = kzalloc_obj(*fw_core);
|
||||
if (!fw_core)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ static struct fw_request *find_firmware(struct fw_download *fw_download,
|
||||
struct fw_request *fw_req;
|
||||
int ret, req_count;
|
||||
|
||||
fw_req = kzalloc_obj(*fw_req, GFP_KERNEL);
|
||||
fw_req = kzalloc_obj(*fw_req);
|
||||
if (!fw_req)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
@@ -409,7 +409,7 @@ int gb_fw_download_connection_init(struct gb_connection *connection)
|
||||
if (!connection)
|
||||
return 0;
|
||||
|
||||
fw_download = kzalloc_obj(*fw_download, GFP_KERNEL);
|
||||
fw_download = kzalloc_obj(*fw_download);
|
||||
if (!fw_download)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -577,7 +577,7 @@ int gb_fw_mgmt_connection_init(struct gb_connection *connection)
|
||||
if (!connection)
|
||||
return 0;
|
||||
|
||||
fw_mgmt = kzalloc_obj(*fw_mgmt, GFP_KERNEL);
|
||||
fw_mgmt = kzalloc_obj(*fw_mgmt);
|
||||
if (!fw_mgmt)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ static struct gbphy_device *gb_gbphy_create_dev(struct gb_bundle *bundle,
|
||||
if (id < 0)
|
||||
return ERR_PTR(id);
|
||||
|
||||
gbphy_dev = kzalloc_obj(*gbphy_dev, GFP_KERNEL);
|
||||
gbphy_dev = kzalloc_obj(*gbphy_dev);
|
||||
if (!gbphy_dev) {
|
||||
ida_free(&gbphy_id, id);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
@@ -282,7 +282,7 @@ static int gb_gbphy_probe(struct gb_bundle *bundle,
|
||||
if (bundle->num_cports == 0)
|
||||
return -ENODEV;
|
||||
|
||||
gbphy_host = kzalloc_obj(*gbphy_host, GFP_KERNEL);
|
||||
gbphy_host = kzalloc_obj(*gbphy_host);
|
||||
if (!gbphy_host)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -485,7 +485,7 @@ static int gb_gpio_controller_setup(struct gb_gpio_controller *ggc)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ggc->lines = kzalloc_objs(*ggc->lines, ggc->line_max + 1, GFP_KERNEL);
|
||||
ggc->lines = kzalloc_objs(*ggc->lines, ggc->line_max + 1);
|
||||
if (!ggc->lines)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -502,7 +502,7 @@ static int gb_gpio_probe(struct gbphy_device *gbphy_dev,
|
||||
struct irq_chip *irqc;
|
||||
int ret;
|
||||
|
||||
ggc = kzalloc_obj(*ggc, GFP_KERNEL);
|
||||
ggc = kzalloc_obj(*ggc);
|
||||
if (!ggc)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@ static int gb_hid_probe(struct gb_bundle *bundle,
|
||||
if (cport_desc->protocol_id != GREYBUS_PROTOCOL_HID)
|
||||
return -ENODEV;
|
||||
|
||||
ghid = kzalloc_obj(*ghid, GFP_KERNEL);
|
||||
ghid = kzalloc_obj(*ghid);
|
||||
if (!ghid)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ static int gb_i2c_probe(struct gbphy_device *gbphy_dev,
|
||||
struct i2c_adapter *adapter;
|
||||
int ret;
|
||||
|
||||
gb_i2c_dev = kzalloc_obj(*gb_i2c_dev, GFP_KERNEL);
|
||||
gb_i2c_dev = kzalloc_obj(*gb_i2c_dev);
|
||||
if (!gb_i2c_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -269,10 +269,10 @@ static int channel_attr_groups_set(struct gb_channel *channel,
|
||||
return 0;
|
||||
|
||||
/* Set attributes based in the channel flags */
|
||||
channel->attrs = kzalloc_objs(*channel->attrs, size + 1, GFP_KERNEL);
|
||||
channel->attrs = kzalloc_objs(*channel->attrs, size + 1);
|
||||
if (!channel->attrs)
|
||||
return -ENOMEM;
|
||||
channel->attr_group = kzalloc_obj(*channel->attr_group, GFP_KERNEL);
|
||||
channel->attr_group = kzalloc_obj(*channel->attr_group);
|
||||
if (!channel->attr_group)
|
||||
return -ENOMEM;
|
||||
channel->attr_groups = kzalloc_objs(*channel->attr_groups, 2,
|
||||
@@ -1262,7 +1262,7 @@ static int gb_lights_probe(struct gb_bundle *bundle,
|
||||
if (cport_desc->protocol_id != GREYBUS_PROTOCOL_LIGHTS)
|
||||
return -ENODEV;
|
||||
|
||||
glights = kzalloc_obj(*glights, GFP_KERNEL);
|
||||
glights = kzalloc_obj(*glights);
|
||||
if (!glights)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ static int gb_log_probe(struct gb_bundle *bundle,
|
||||
if (cport_desc->protocol_id != GREYBUS_PROTOCOL_LOG)
|
||||
return -ENODEV;
|
||||
|
||||
log = kzalloc_obj(*log, GFP_KERNEL);
|
||||
log = kzalloc_obj(*log);
|
||||
if (!log)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -471,7 +471,7 @@ static int gb_loopback_async_operation(struct gb_loopback *gb, int type,
|
||||
struct gb_operation *operation;
|
||||
int ret;
|
||||
|
||||
op_async = kzalloc_obj(*op_async, GFP_KERNEL);
|
||||
op_async = kzalloc_obj(*op_async);
|
||||
if (!op_async)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -989,7 +989,7 @@ static int gb_loopback_probe(struct gb_bundle *bundle,
|
||||
if (cport_desc->protocol_id != GREYBUS_PROTOCOL_LOOPBACK)
|
||||
return -ENODEV;
|
||||
|
||||
gb = kzalloc_obj(*gb, GFP_KERNEL);
|
||||
gb = kzalloc_obj(*gb);
|
||||
if (!gb)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -1063,7 +1063,7 @@ static int gb_power_supply_probe(struct gb_bundle *bundle,
|
||||
if (cport_desc->protocol_id != GREYBUS_PROTOCOL_POWER_SUPPLY)
|
||||
return -ENODEV;
|
||||
|
||||
supplies = kzalloc_obj(*supplies, GFP_KERNEL);
|
||||
supplies = kzalloc_obj(*supplies);
|
||||
if (!supplies)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ static int gb_raw_probe(struct gb_bundle *bundle,
|
||||
if (cport_desc->protocol_id != GREYBUS_PROTOCOL_RAW)
|
||||
return -ENODEV;
|
||||
|
||||
raw = kzalloc_obj(*raw, GFP_KERNEL);
|
||||
raw = kzalloc_obj(*raw);
|
||||
if (!raw)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -823,7 +823,7 @@ static int gb_uart_probe(struct gbphy_device *gbphy_dev,
|
||||
goto exit_connection_destroy;
|
||||
}
|
||||
|
||||
gb_tty = kzalloc_obj(*gb_tty, GFP_KERNEL);
|
||||
gb_tty = kzalloc_obj(*gb_tty);
|
||||
if (!gb_tty) {
|
||||
retval = -ENOMEM;
|
||||
goto exit_connection_destroy;
|
||||
|
||||
@@ -128,7 +128,7 @@ static int gb_vibrator_probe(struct gb_bundle *bundle,
|
||||
if (cport_desc->protocol_id != GREYBUS_PROTOCOL_VIBRATOR)
|
||||
return -ENODEV;
|
||||
|
||||
vib = kzalloc_obj(*vib, GFP_KERNEL);
|
||||
vib = kzalloc_obj(*vib);
|
||||
if (!vib)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -794,7 +794,7 @@ static int gc2235_probe(struct i2c_client *client)
|
||||
int ret;
|
||||
unsigned int i;
|
||||
|
||||
dev = kzalloc_obj(*dev, GFP_KERNEL);
|
||||
dev = kzalloc_obj(*dev);
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -952,7 +952,7 @@ static int ov2722_probe(struct i2c_client *client)
|
||||
void *ovpdev;
|
||||
int ret;
|
||||
|
||||
dev = kzalloc_obj(*dev, GFP_KERNEL);
|
||||
dev = kzalloc_obj(*dev);
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -2960,7 +2960,7 @@ int atomisp_set_parameters(struct video_device *vdev,
|
||||
* are ready, the parameters will be set to CSS.
|
||||
* per-frame setting only works for the main output frame.
|
||||
*/
|
||||
param = kvzalloc_obj(*param, GFP_KERNEL);
|
||||
param = kvzalloc_obj(*param);
|
||||
if (!param)
|
||||
return -ENOMEM;
|
||||
css_param = ¶m->params;
|
||||
|
||||
@@ -969,7 +969,7 @@ static int camera_sensor_csi_alloc(struct v4l2_subdev *sd, u32 port, u32 lanes,
|
||||
struct i2c_client *client = v4l2_get_subdevdata(sd);
|
||||
struct camera_mipi_info *csi;
|
||||
|
||||
csi = kzalloc_obj(*csi, GFP_KERNEL);
|
||||
csi = kzalloc_obj(*csi);
|
||||
if (!csi)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -676,7 +676,7 @@ int hmm_bo_alloc_pages(struct hmm_buffer_object *bo,
|
||||
mutex_lock(&bo->mutex);
|
||||
check_bo_status_no_goto(bo, HMM_BO_PAGE_ALLOCED, status_err);
|
||||
|
||||
bo->pages = kzalloc_objs(struct page *, bo->pgnr, GFP_KERNEL);
|
||||
bo->pages = kzalloc_objs(struct page *, bo->pgnr);
|
||||
if (unlikely(!bo->pages)) {
|
||||
ret = -ENOMEM;
|
||||
goto alloc_err;
|
||||
|
||||
@@ -309,7 +309,7 @@ ia_css_isp_dvs_statistics_allocate(
|
||||
if (!grid->enable)
|
||||
return NULL;
|
||||
|
||||
me = kvzalloc_objs(*me, 1, GFP_KERNEL);
|
||||
me = kvzalloc_objs(*me, 1);
|
||||
if (!me)
|
||||
goto err;
|
||||
|
||||
@@ -350,7 +350,7 @@ ia_css_isp_dvs_statistics_map_allocate(
|
||||
* so we use a local char * instead. */
|
||||
char *base_ptr;
|
||||
|
||||
me = kvmalloc_obj(*me, GFP_KERNEL);
|
||||
me = kvmalloc_obj(*me);
|
||||
if (!me) {
|
||||
IA_CSS_LOG("cannot allocate memory");
|
||||
goto err;
|
||||
|
||||
@@ -274,7 +274,7 @@ ia_css_isp_dvs2_statistics_allocate(
|
||||
if (!grid->enable)
|
||||
return NULL;
|
||||
|
||||
me = kvzalloc_objs(*me, 1, GFP_KERNEL);
|
||||
me = kvzalloc_objs(*me, 1);
|
||||
if (!me)
|
||||
goto err;
|
||||
|
||||
|
||||
@@ -650,7 +650,7 @@ static struct ia_css_frame *frame_create(unsigned int width,
|
||||
unsigned int raw_bit_depth,
|
||||
bool valid)
|
||||
{
|
||||
struct ia_css_frame *me = kvmalloc_obj(*me, GFP_KERNEL);
|
||||
struct ia_css_frame *me = kvmalloc_obj(*me);
|
||||
|
||||
if (!me)
|
||||
return NULL;
|
||||
|
||||
@@ -579,7 +579,7 @@ static int pipeline_stage_create(
|
||||
out_frame[i] = stage_desc->out_frame[i];
|
||||
}
|
||||
|
||||
stage = kvzalloc_obj(*stage, GFP_KERNEL);
|
||||
stage = kvzalloc_obj(*stage);
|
||||
if (!stage) {
|
||||
err = -ENOMEM;
|
||||
goto ERR;
|
||||
|
||||
@@ -1880,7 +1880,7 @@ create_pipe(enum ia_css_pipe_mode mode,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
me = kmalloc_obj(*me, GFP_KERNEL);
|
||||
me = kmalloc_obj(*me);
|
||||
if (!me)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -7910,7 +7910,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
|
||||
}
|
||||
|
||||
/* allocate the stream instance */
|
||||
curr_stream = kzalloc_obj(struct ia_css_stream, GFP_KERNEL);
|
||||
curr_stream = kzalloc_obj(struct ia_css_stream);
|
||||
if (!curr_stream) {
|
||||
err = -ENOMEM;
|
||||
IA_CSS_LEAVE_ERR(err);
|
||||
|
||||
@@ -12,7 +12,7 @@ struct ia_css_host_data *ia_css_host_data_allocate(size_t size)
|
||||
{
|
||||
struct ia_css_host_data *me;
|
||||
|
||||
me = kmalloc_obj(struct ia_css_host_data, GFP_KERNEL);
|
||||
me = kmalloc_obj(struct ia_css_host_data);
|
||||
if (!me)
|
||||
return NULL;
|
||||
me->size = (uint32_t)size;
|
||||
|
||||
@@ -22,7 +22,7 @@ alloc_dvs_6axis_table(const struct ia_css_resolution *frame_res,
|
||||
int err = 0;
|
||||
struct ia_css_dvs_6axis_config *dvs_config = NULL;
|
||||
|
||||
dvs_config = kvmalloc_obj(struct ia_css_dvs_6axis_config, GFP_KERNEL);
|
||||
dvs_config = kvmalloc_obj(struct ia_css_dvs_6axis_config);
|
||||
if (!dvs_config) {
|
||||
IA_CSS_ERROR("out of memory");
|
||||
err = -ENOMEM;
|
||||
|
||||
@@ -328,7 +328,7 @@ ia_css_shading_table_alloc(
|
||||
|
||||
IA_CSS_ENTER("");
|
||||
|
||||
me = kmalloc_obj(*me, GFP_KERNEL);
|
||||
me = kmalloc_obj(*me);
|
||||
if (!me)
|
||||
return me;
|
||||
|
||||
|
||||
@@ -1369,7 +1369,7 @@ struct ia_css_morph_table *ia_css_morph_table_allocate(
|
||||
|
||||
IA_CSS_ENTER("");
|
||||
|
||||
me = kvmalloc_obj(*me, GFP_KERNEL);
|
||||
me = kvmalloc_obj(*me);
|
||||
if (!me) {
|
||||
IA_CSS_ERROR("out of memory");
|
||||
return me;
|
||||
@@ -1516,7 +1516,7 @@ ia_css_isp_3a_statistics_map_allocate(
|
||||
* so we use a local char * instead. */
|
||||
char *base_ptr;
|
||||
|
||||
me = kvmalloc_obj(*me, GFP_KERNEL);
|
||||
me = kvmalloc_obj(*me);
|
||||
if (!me) {
|
||||
IA_CSS_LEAVE("cannot allocate memory");
|
||||
goto err;
|
||||
@@ -2136,7 +2136,7 @@ ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
|
||||
if (!grid->enable)
|
||||
return NULL;
|
||||
|
||||
me = kvzalloc_objs(*me, 1, GFP_KERNEL);
|
||||
me = kvzalloc_objs(*me, 1);
|
||||
if (!me)
|
||||
goto err;
|
||||
|
||||
@@ -2200,7 +2200,7 @@ ia_css_metadata_allocate(const struct ia_css_metadata_info *metadata_info)
|
||||
if (metadata_info->size == 0)
|
||||
return NULL;
|
||||
|
||||
md = kvmalloc_obj(*md, GFP_KERNEL);
|
||||
md = kvmalloc_obj(*md);
|
||||
if (!md)
|
||||
goto error;
|
||||
|
||||
@@ -2330,7 +2330,7 @@ sh_css_create_isp_params(struct ia_css_stream *stream,
|
||||
int err;
|
||||
size_t params_size;
|
||||
struct ia_css_isp_parameters *params =
|
||||
kvmalloc_obj(struct ia_css_isp_parameters, GFP_KERNEL);
|
||||
kvmalloc_obj(struct ia_css_isp_parameters);
|
||||
|
||||
if (!params) {
|
||||
*isp_params_out = NULL;
|
||||
@@ -4161,7 +4161,7 @@ ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
|
||||
|
||||
assert(grid);
|
||||
|
||||
me = kvzalloc_objs(*me, 1, GFP_KERNEL);
|
||||
me = kvzalloc_objs(*me, 1);
|
||||
if (!me)
|
||||
goto err;
|
||||
|
||||
@@ -4201,7 +4201,7 @@ ia_css_dvs_statistics_allocate(const struct ia_css_dvs_grid_info *grid)
|
||||
|
||||
assert(grid);
|
||||
|
||||
me = kvzalloc_objs(*me, 1, GFP_KERNEL);
|
||||
me = kvzalloc_objs(*me, 1);
|
||||
if (!me)
|
||||
goto err;
|
||||
|
||||
@@ -4239,7 +4239,7 @@ ia_css_dvs_coefficients_allocate(const struct ia_css_dvs_grid_info *grid)
|
||||
|
||||
assert(grid);
|
||||
|
||||
me = kvzalloc_objs(*me, 1, GFP_KERNEL);
|
||||
me = kvzalloc_objs(*me, 1);
|
||||
if (!me)
|
||||
goto err;
|
||||
|
||||
@@ -4280,7 +4280,7 @@ ia_css_dvs2_statistics_allocate(const struct ia_css_dvs_grid_info *grid)
|
||||
|
||||
assert(grid);
|
||||
|
||||
me = kvzalloc_objs(*me, 1, GFP_KERNEL);
|
||||
me = kvzalloc_objs(*me, 1);
|
||||
if (!me)
|
||||
goto err;
|
||||
|
||||
@@ -4371,7 +4371,7 @@ ia_css_dvs2_coefficients_allocate(const struct ia_css_dvs_grid_info *grid)
|
||||
|
||||
assert(grid);
|
||||
|
||||
me = kvzalloc_objs(*me, 1, GFP_KERNEL);
|
||||
me = kvzalloc_objs(*me, 1);
|
||||
if (!me)
|
||||
goto err;
|
||||
|
||||
|
||||
@@ -2424,7 +2424,7 @@ static int av7110_attach(struct saa7146_dev *dev,
|
||||
}
|
||||
|
||||
/* prepare the av7110 device struct */
|
||||
av7110 = kzalloc_obj(*av7110, GFP_KERNEL);
|
||||
av7110 = kzalloc_obj(*av7110);
|
||||
if (!av7110) {
|
||||
dprintk(1, "out of memory\n");
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -563,7 +563,7 @@ struct dvb_frontend *sp8870_attach(const struct sp8870_config *config,
|
||||
struct sp8870_state *state = NULL;
|
||||
|
||||
/* allocate memory for the internal state */
|
||||
state = kzalloc_obj(*state, GFP_KERNEL);
|
||||
state = kzalloc_obj(*state);
|
||||
if (!state)
|
||||
goto error;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ static void device_run(void *_ctx)
|
||||
src_buf = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
|
||||
|
||||
run = kzalloc_obj(*run, GFP_KERNEL);
|
||||
run = kzalloc_obj(*run);
|
||||
if (!run)
|
||||
goto err;
|
||||
|
||||
@@ -756,7 +756,7 @@ static int ipu_csc_scaler_open(struct file *file)
|
||||
struct ipu_csc_scaler_ctx *ctx = NULL;
|
||||
int ret;
|
||||
|
||||
ctx = kzalloc_obj(*ctx, GFP_KERNEL);
|
||||
ctx = kzalloc_obj(*ctx);
|
||||
if (!ctx)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -880,7 +880,7 @@ imx_media_csc_scaler_device_init(struct imx_media_dev *md)
|
||||
struct video_device *vfd;
|
||||
int ret;
|
||||
|
||||
priv = kzalloc_obj(*priv, GFP_KERNEL);
|
||||
priv = kzalloc_obj(*priv);
|
||||
if (!priv)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ int imgu_css_fw_init(struct imgu_css *css)
|
||||
|
||||
/* Allocate and map fw binaries into IMGU */
|
||||
|
||||
css->binary = kzalloc_objs(*css->binary, binary_nr, GFP_KERNEL);
|
||||
css->binary = kzalloc_objs(*css->binary, binary_nr);
|
||||
if (!css->binary) {
|
||||
r = -ENOMEM;
|
||||
goto error_out;
|
||||
|
||||
@@ -1702,7 +1702,7 @@ int imgu_css_fmt_try(struct imgu_css *css,
|
||||
struct v4l2_pix_format_mplane *in, *out, *vf;
|
||||
int i, s, ret;
|
||||
|
||||
q = kzalloc_objs(struct imgu_css_queue, IPU3_CSS_QUEUES, GFP_KERNEL);
|
||||
q = kzalloc_objs(struct imgu_css_queue, IPU3_CSS_QUEUES);
|
||||
if (!q)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ static struct page **imgu_dmamap_alloc_buffer(size_t size, gfp_t gfp)
|
||||
const gfp_t high_order_gfp = __GFP_NOWARN | __GFP_NORETRY;
|
||||
|
||||
/* Allocate mem for array of page ptrs */
|
||||
pages = kvmalloc_objs(*pages, count, GFP_KERNEL);
|
||||
pages = kvmalloc_objs(*pages, count);
|
||||
|
||||
if (!pages)
|
||||
return NULL;
|
||||
|
||||
@@ -429,7 +429,7 @@ struct imgu_mmu_info *imgu_mmu_init(struct device *parent, void __iomem *base)
|
||||
struct imgu_mmu *mmu;
|
||||
u32 pteval;
|
||||
|
||||
mmu = kzalloc_obj(*mmu, GFP_KERNEL);
|
||||
mmu = kzalloc_obj(*mmu);
|
||||
if (!mmu)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ ipu7_bus_initialize_device(struct pci_dev *pdev, struct device *parent,
|
||||
struct ipu7_device *isp = pci_get_drvdata(pdev);
|
||||
int ret;
|
||||
|
||||
adev = kzalloc_obj(*adev, GFP_KERNEL);
|
||||
adev = kzalloc_obj(*adev);
|
||||
if (!adev)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ void *ipu7_dma_alloc(struct ipu7_bus_device *sys, size_t size,
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
info = kzalloc_obj(*info, GFP_KERNEL);
|
||||
info = kzalloc_obj(*info);
|
||||
if (!info)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -584,7 +584,7 @@ static struct ipu7_mmu_info *ipu7_mmu_alloc(struct ipu7_device *isp)
|
||||
struct ipu7_mmu_info *mmu_info;
|
||||
int ret;
|
||||
|
||||
mmu_info = kzalloc_obj(*mmu_info, GFP_KERNEL);
|
||||
mmu_info = kzalloc_obj(*mmu_info);
|
||||
if (!mmu_info)
|
||||
return NULL;
|
||||
|
||||
@@ -654,7 +654,7 @@ static struct ipu7_dma_mapping *alloc_dma_mapping(struct ipu7_device *isp)
|
||||
struct ipu7_dma_mapping *dmap;
|
||||
unsigned long base_pfn;
|
||||
|
||||
dmap = kzalloc_obj(*dmap, GFP_KERNEL);
|
||||
dmap = kzalloc_obj(*dmap);
|
||||
if (!dmap)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -2150,7 +2150,7 @@ ipu7_isys_init(struct pci_dev *pdev, struct device *parent,
|
||||
}
|
||||
}
|
||||
|
||||
pdata = kzalloc_obj(*pdata, GFP_KERNEL);
|
||||
pdata = kzalloc_obj(*pdata);
|
||||
if (!pdata)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
@@ -2197,7 +2197,7 @@ ipu7_psys_init(struct pci_dev *pdev, struct device *parent,
|
||||
struct ipu7_psys_pdata *pdata;
|
||||
int ret;
|
||||
|
||||
pdata = kzalloc_obj(*pdata, GFP_KERNEL);
|
||||
pdata = kzalloc_obj(*pdata);
|
||||
if (!pdata)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
@@ -2271,7 +2271,7 @@ static int ipu7_map_fw_code_region(struct ipu7_bus_device *sys,
|
||||
|
||||
n_pages = PFN_UP(size);
|
||||
|
||||
pages = kmalloc_objs(*pages, n_pages, GFP_KERNEL);
|
||||
pages = kmalloc_objs(*pages, n_pages);
|
||||
if (!pages)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ static int codec_h264_load_extended_firmware(struct amvdec_session *sess,
|
||||
if (len < SIZE_EXT_FW)
|
||||
return -EINVAL;
|
||||
|
||||
h264 = kzalloc_obj(*h264, GFP_KERNEL);
|
||||
h264 = kzalloc_obj(*h264);
|
||||
if (!h264)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ static int codec_mpeg12_start(struct amvdec_session *sess)
|
||||
struct codec_mpeg12 *mpeg12;
|
||||
int ret;
|
||||
|
||||
mpeg12 = kzalloc_obj(*mpeg12, GFP_KERNEL);
|
||||
mpeg12 = kzalloc_obj(*mpeg12);
|
||||
if (!mpeg12)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -762,7 +762,7 @@ static int codec_vp9_start(struct amvdec_session *sess)
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
vp9 = kzalloc_obj(*vp9, GFP_KERNEL);
|
||||
vp9 = kzalloc_obj(*vp9);
|
||||
if (!vp9)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1192,7 +1192,7 @@ static struct vp9_frame *codec_vp9_get_new_frame(struct amvdec_session *sess)
|
||||
struct vb2_v4l2_buffer *vbuf;
|
||||
struct vp9_frame *new_frame;
|
||||
|
||||
new_frame = kzalloc_obj(*new_frame, GFP_KERNEL);
|
||||
new_frame = kzalloc_obj(*new_frame);
|
||||
if (!new_frame)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ vdec_queue_recycle(struct amvdec_session *sess, struct vb2_buffer *vb)
|
||||
{
|
||||
struct amvdec_buffer *new_buf;
|
||||
|
||||
new_buf = kmalloc_obj(*new_buf, GFP_KERNEL);
|
||||
new_buf = kmalloc_obj(*new_buf);
|
||||
if (!new_buf)
|
||||
return;
|
||||
new_buf->vb = vb;
|
||||
@@ -867,7 +867,7 @@ static int vdec_open(struct file *file)
|
||||
struct amvdec_session *sess;
|
||||
int ret;
|
||||
|
||||
sess = kzalloc_obj(*sess, GFP_KERNEL);
|
||||
sess = kzalloc_obj(*sess);
|
||||
if (!sess)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ int amvdec_add_ts(struct amvdec_session *sess, u64 ts,
|
||||
struct amvdec_timestamp *new_ts;
|
||||
unsigned long flags;
|
||||
|
||||
new_ts = kzalloc_obj(*new_ts, GFP_KERNEL);
|
||||
new_ts = kzalloc_obj(*new_ts);
|
||||
if (!new_ts)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ static int cedrus_open(struct file *file)
|
||||
if (mutex_lock_interruptible(&dev->dev_mutex))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
ctx = kzalloc_obj(*ctx, GFP_KERNEL);
|
||||
ctx = kzalloc_obj(*ctx);
|
||||
if (!ctx) {
|
||||
mutex_unlock(&dev->dev_mutex);
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -463,7 +463,7 @@ static int tegra_csi_channel_alloc(struct tegra_csi *csi,
|
||||
struct tegra_csi_channel *chan;
|
||||
int ret = 0, i;
|
||||
|
||||
chan = kzalloc_obj(*chan, GFP_KERNEL);
|
||||
chan = kzalloc_obj(*chan);
|
||||
if (!chan)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -1209,7 +1209,7 @@ static int tegra_vi_channel_alloc(struct tegra_vi *vi, unsigned int port_num,
|
||||
* be holding the device node open. Channel memory allocated
|
||||
* with kzalloc is freed during video device release callback.
|
||||
*/
|
||||
chan = kzalloc_obj(*chan, GFP_KERNEL);
|
||||
chan = kzalloc_obj(*chan);
|
||||
if (!chan)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ static int host1x_video_probe(struct host1x_device *dev)
|
||||
struct tegra_video_device *vid;
|
||||
int ret;
|
||||
|
||||
vid = kzalloc_obj(*vid, GFP_KERNEL);
|
||||
vid = kzalloc_obj(*vid);
|
||||
if (!vid)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -759,7 +759,7 @@ static int dim2_probe(struct platform_device *pdev)
|
||||
|
||||
enum { MLB_INT_IDX, AHB0_INT_IDX };
|
||||
|
||||
dev = kzalloc_obj(*dev, GFP_KERNEL);
|
||||
dev = kzalloc_obj(*dev);
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ static int comp_vdev_open(struct file *filp)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
fh = kzalloc_obj(*fh, GFP_KERNEL);
|
||||
fh = kzalloc_obj(*fh);
|
||||
if (!fh)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -474,7 +474,7 @@ static int comp_probe_channel(struct most_interface *iface, int channel_idx,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mdev = kzalloc_obj(*mdev, GFP_KERNEL);
|
||||
mdev = kzalloc_obj(*mdev);
|
||||
if (!mdev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ static int nvec_mouse_probe(struct platform_device *pdev)
|
||||
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
|
||||
struct serio *ser_dev;
|
||||
|
||||
ser_dev = kzalloc_obj(*ser_dev, GFP_KERNEL);
|
||||
ser_dev = kzalloc_obj(*ser_dev);
|
||||
if (!ser_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -1229,13 +1229,13 @@ u8 rtw_ap_set_pairwise_key(struct adapter *padapter, struct sta_info *psta)
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
ph2c = kzalloc_obj(*ph2c, GFP_KERNEL);
|
||||
ph2c = kzalloc_obj(*ph2c);
|
||||
if (!ph2c) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetstakey_para = kzalloc_obj(*psetstakey_para, GFP_KERNEL);
|
||||
psetstakey_para = kzalloc_obj(*psetstakey_para);
|
||||
if (!psetstakey_para) {
|
||||
kfree(ph2c);
|
||||
res = _FAIL;
|
||||
@@ -1269,12 +1269,12 @@ static int rtw_ap_set_key(struct adapter *padapter,
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
int res = _SUCCESS;
|
||||
|
||||
pcmd = kzalloc_obj(*pcmd, GFP_KERNEL);
|
||||
pcmd = kzalloc_obj(*pcmd);
|
||||
if (!pcmd) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
psetkeyparm = kzalloc_obj(*psetkeyparm, GFP_KERNEL);
|
||||
psetkeyparm = kzalloc_obj(*psetkeyparm);
|
||||
if (!psetkeyparm) {
|
||||
kfree(pcmd);
|
||||
res = _FAIL;
|
||||
|
||||
@@ -634,7 +634,7 @@ int rtw_startbss_cmd(struct adapter *padapter, int flags)
|
||||
start_bss_network(padapter);
|
||||
} else {
|
||||
/* need enqueue, prepare cmd_obj and enqueue */
|
||||
pcmd = kzalloc_obj(*pcmd, GFP_KERNEL);
|
||||
pcmd = kzalloc_obj(*pcmd);
|
||||
if (!pcmd) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
@@ -686,7 +686,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
|
||||
u32 tmp_len;
|
||||
u8 *ptmp = NULL;
|
||||
|
||||
pcmd = kzalloc_obj(*pcmd, GFP_KERNEL);
|
||||
pcmd = kzalloc_obj(*pcmd);
|
||||
if (!pcmd) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
@@ -795,7 +795,7 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueu
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
/* prepare cmd parameter */
|
||||
param = kzalloc_obj(*param, GFP_KERNEL);
|
||||
param = kzalloc_obj(*param);
|
||||
if (!param) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
@@ -804,7 +804,7 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueu
|
||||
|
||||
if (enqueue) {
|
||||
/* need enqueue, prepare cmd_obj and enqueue */
|
||||
cmdobj = kzalloc_obj(*cmdobj, GFP_KERNEL);
|
||||
cmdobj = kzalloc_obj(*cmdobj);
|
||||
if (!cmdobj) {
|
||||
res = _FAIL;
|
||||
kfree(param);
|
||||
@@ -831,7 +831,7 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infrast
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
psetop = kzalloc_obj(*psetop, GFP_KERNEL);
|
||||
psetop = kzalloc_obj(*psetop);
|
||||
if (!psetop) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
@@ -839,7 +839,7 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infrast
|
||||
psetop->mode = (u8)networktype;
|
||||
|
||||
if (enqueue) {
|
||||
ph2c = kzalloc_obj(*ph2c, GFP_KERNEL);
|
||||
ph2c = kzalloc_obj(*ph2c);
|
||||
if (!ph2c) {
|
||||
kfree(psetop);
|
||||
res = _FAIL;
|
||||
@@ -866,7 +866,7 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 unicast_
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
psetstakey_para = kzalloc_obj(*psetstakey_para, GFP_KERNEL);
|
||||
psetstakey_para = kzalloc_obj(*psetstakey_para);
|
||||
if (!psetstakey_para) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
@@ -888,14 +888,14 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 unicast_
|
||||
padapter->securitypriv.busetkipkey = true;
|
||||
|
||||
if (enqueue) {
|
||||
ph2c = kzalloc_obj(*ph2c, GFP_KERNEL);
|
||||
ph2c = kzalloc_obj(*ph2c);
|
||||
if (!ph2c) {
|
||||
kfree(psetstakey_para);
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetstakey_rsp = kzalloc_obj(*psetstakey_rsp, GFP_KERNEL);
|
||||
psetstakey_rsp = kzalloc_obj(*psetstakey_rsp);
|
||||
if (!psetstakey_rsp) {
|
||||
kfree(ph2c);
|
||||
kfree(psetstakey_para);
|
||||
@@ -933,20 +933,20 @@ u8 rtw_clearstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 enqueu
|
||||
rtw_camid_free(padapter, cam_id);
|
||||
}
|
||||
} else {
|
||||
ph2c = kzalloc_obj(*ph2c, GFP_KERNEL);
|
||||
ph2c = kzalloc_obj(*ph2c);
|
||||
if (!ph2c) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetstakey_para = kzalloc_obj(*psetstakey_para, GFP_KERNEL);
|
||||
psetstakey_para = kzalloc_obj(*psetstakey_para);
|
||||
if (!psetstakey_para) {
|
||||
kfree(ph2c);
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetstakey_rsp = kzalloc_obj(*psetstakey_rsp, GFP_KERNEL);
|
||||
psetstakey_rsp = kzalloc_obj(*psetstakey_rsp);
|
||||
if (!psetstakey_rsp) {
|
||||
kfree(ph2c);
|
||||
kfree(psetstakey_para);
|
||||
@@ -1651,13 +1651,13 @@ u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt)
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
ph2c = kzalloc_obj(*ph2c, GFP_KERNEL);
|
||||
ph2c = kzalloc_obj(*ph2c);
|
||||
if (!ph2c) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = kzalloc_obj(*pdrvextra_cmd_parm, GFP_KERNEL);
|
||||
pdrvextra_cmd_parm = kzalloc_obj(*pdrvextra_cmd_parm);
|
||||
if (!pdrvextra_cmd_parm) {
|
||||
kfree(ph2c);
|
||||
res = _FAIL;
|
||||
|
||||
@@ -1875,13 +1875,13 @@ signed int rtw_set_auth(struct adapter *adapter, struct security_priv *psecurity
|
||||
struct cmd_priv *pcmdpriv = &adapter->cmdpriv;
|
||||
signed int res = _SUCCESS;
|
||||
|
||||
pcmd = kzalloc_obj(*pcmd, GFP_KERNEL);
|
||||
pcmd = kzalloc_obj(*pcmd);
|
||||
if (!pcmd) {
|
||||
res = _FAIL; /* try again */
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetauthparm = kzalloc_obj(*psetauthparm, GFP_KERNEL);
|
||||
psetauthparm = kzalloc_obj(*psetauthparm);
|
||||
if (!psetauthparm) {
|
||||
kfree(pcmd);
|
||||
res = _FAIL;
|
||||
@@ -1912,7 +1912,7 @@ signed int rtw_set_key(struct adapter *adapter, struct security_priv *psecurityp
|
||||
struct cmd_priv *pcmdpriv = &adapter->cmdpriv;
|
||||
signed int res = _SUCCESS;
|
||||
|
||||
psetkeyparm = kzalloc_obj(*psetkeyparm, GFP_KERNEL);
|
||||
psetkeyparm = kzalloc_obj(*psetkeyparm);
|
||||
if (!psetkeyparm) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
@@ -1954,7 +1954,7 @@ signed int rtw_set_key(struct adapter *adapter, struct security_priv *psecurityp
|
||||
}
|
||||
|
||||
if (enqueue) {
|
||||
pcmd = kzalloc_obj(*pcmd, GFP_KERNEL);
|
||||
pcmd = kzalloc_obj(*pcmd);
|
||||
if (!pcmd) {
|
||||
kfree(psetkeyparm);
|
||||
res = _FAIL; /* try again */
|
||||
|
||||
@@ -1131,7 +1131,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
||||
if (memcmp(cur_network->network.mac_address, pbssid, 6))
|
||||
return true;
|
||||
|
||||
bssid = kzalloc_obj(*bssid, GFP_KERNEL);
|
||||
bssid = kzalloc_obj(*bssid);
|
||||
if (!bssid)
|
||||
return true;
|
||||
|
||||
|
||||
@@ -306,10 +306,10 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw)
|
||||
u8 *fwfilepath;
|
||||
u8 tmp_ps;
|
||||
|
||||
pFirmware = kzalloc_obj(struct rt_firmware, GFP_KERNEL);
|
||||
pFirmware = kzalloc_obj(struct rt_firmware);
|
||||
if (!pFirmware)
|
||||
return _FAIL;
|
||||
pBTFirmware = kzalloc_obj(struct rt_firmware, GFP_KERNEL);
|
||||
pBTFirmware = kzalloc_obj(struct rt_firmware);
|
||||
if (!pBTFirmware) {
|
||||
kfree(pFirmware);
|
||||
return _FAIL;
|
||||
|
||||
@@ -1248,7 +1248,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
||||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
|
||||
ssid = kzalloc_objs(*ssid, RTW_SSID_SCAN_AMOUNT, GFP_KERNEL);
|
||||
ssid = kzalloc_objs(*ssid, RTW_SSID_SCAN_AMOUNT);
|
||||
if (!ssid) {
|
||||
ret = -ENOMEM;
|
||||
goto check_need_indicate_scan_done;
|
||||
@@ -2145,7 +2145,7 @@ static int rtw_cfg80211_add_monitor_if(struct adapter *padapter, char *name, str
|
||||
pnpi->sizeof_priv = sizeof(struct adapter);
|
||||
|
||||
/* wdev */
|
||||
mon_wdev = kzalloc_obj(*mon_wdev, GFP_KERNEL);
|
||||
mon_wdev = kzalloc_obj(*mon_wdev);
|
||||
if (!mon_wdev) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
@@ -2726,7 +2726,7 @@ int rtw_wdev_alloc(struct adapter *padapter, struct device *dev)
|
||||
goto free_wiphy;
|
||||
|
||||
/* wdev */
|
||||
wdev = kzalloc_obj(*wdev, GFP_KERNEL);
|
||||
wdev = kzalloc_obj(*wdev);
|
||||
if (!wdev) {
|
||||
ret = -ENOMEM;
|
||||
goto unregister_wiphy;
|
||||
|
||||
@@ -568,7 +568,7 @@ struct dvobj_priv *devobj_init(void)
|
||||
{
|
||||
struct dvobj_priv *pdvobj = NULL;
|
||||
|
||||
pdvobj = kzalloc_obj(*pdvobj, GFP_KERNEL);
|
||||
pdvobj = kzalloc_obj(*pdvobj);
|
||||
if (!pdvobj)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ static int snd_bcm2835_playback_open_generic(struct snd_pcm_substream *substream
|
||||
goto out;
|
||||
}
|
||||
|
||||
alsa_stream = kzalloc_obj(*alsa_stream, GFP_KERNEL);
|
||||
alsa_stream = kzalloc_obj(*alsa_stream);
|
||||
if (!alsa_stream) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
|
||||
@@ -219,7 +219,7 @@ int bcm2835_audio_open(struct bcm2835_alsa_stream *alsa_stream)
|
||||
int err;
|
||||
|
||||
/* Allocate memory for this instance */
|
||||
instance = kzalloc_obj(*instance, GFP_KERNEL);
|
||||
instance = kzalloc_obj(*instance);
|
||||
if (!instance)
|
||||
return -ENOMEM;
|
||||
mutex_init(&instance->vchi_mutex);
|
||||
|
||||
@@ -287,7 +287,7 @@ struct vme_resource *vme_slave_request(struct vme_dev *vdev, u32 address,
|
||||
if (!allocated_image)
|
||||
goto err_image;
|
||||
|
||||
resource = kmalloc_obj(*resource, GFP_KERNEL);
|
||||
resource = kmalloc_obj(*resource);
|
||||
if (!resource)
|
||||
goto err_alloc;
|
||||
|
||||
@@ -484,7 +484,7 @@ struct vme_resource *vme_master_request(struct vme_dev *vdev, u32 address,
|
||||
goto err_image;
|
||||
}
|
||||
|
||||
resource = kmalloc_obj(*resource, GFP_KERNEL);
|
||||
resource = kmalloc_obj(*resource);
|
||||
if (!resource)
|
||||
goto err_alloc;
|
||||
|
||||
@@ -854,7 +854,7 @@ struct vme_resource *vme_dma_request(struct vme_dev *vdev, u32 route)
|
||||
if (!allocated_ctrlr)
|
||||
goto err_ctrlr;
|
||||
|
||||
resource = kmalloc_obj(*resource, GFP_KERNEL);
|
||||
resource = kmalloc_obj(*resource);
|
||||
if (!resource)
|
||||
goto err_alloc;
|
||||
|
||||
@@ -894,7 +894,7 @@ struct vme_dma_list *vme_new_dma_list(struct vme_resource *resource)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dma_list = kmalloc_obj(*dma_list, GFP_KERNEL);
|
||||
dma_list = kmalloc_obj(*dma_list);
|
||||
if (!dma_list)
|
||||
return NULL;
|
||||
|
||||
@@ -924,11 +924,11 @@ struct vme_dma_attr *vme_dma_pattern_attribute(u32 pattern, u32 type)
|
||||
struct vme_dma_attr *attributes;
|
||||
struct vme_dma_pattern *pattern_attr;
|
||||
|
||||
attributes = kmalloc_obj(*attributes, GFP_KERNEL);
|
||||
attributes = kmalloc_obj(*attributes);
|
||||
if (!attributes)
|
||||
goto err_attr;
|
||||
|
||||
pattern_attr = kmalloc_obj(*pattern_attr, GFP_KERNEL);
|
||||
pattern_attr = kmalloc_obj(*pattern_attr);
|
||||
if (!pattern_attr)
|
||||
goto err_pat;
|
||||
|
||||
@@ -964,11 +964,11 @@ struct vme_dma_attr *vme_dma_pci_attribute(dma_addr_t address)
|
||||
|
||||
/* XXX Run some sanity checks here */
|
||||
|
||||
attributes = kmalloc_obj(*attributes, GFP_KERNEL);
|
||||
attributes = kmalloc_obj(*attributes);
|
||||
if (!attributes)
|
||||
goto err_attr;
|
||||
|
||||
pci_attr = kmalloc_obj(*pci_attr, GFP_KERNEL);
|
||||
pci_attr = kmalloc_obj(*pci_attr);
|
||||
if (!pci_attr)
|
||||
goto err_pci;
|
||||
|
||||
@@ -1005,11 +1005,11 @@ struct vme_dma_attr *vme_dma_vme_attribute(unsigned long long address,
|
||||
struct vme_dma_attr *attributes;
|
||||
struct vme_dma_vme *vme_attr;
|
||||
|
||||
attributes = kmalloc_obj(*attributes, GFP_KERNEL);
|
||||
attributes = kmalloc_obj(*attributes);
|
||||
if (!attributes)
|
||||
goto err_attr;
|
||||
|
||||
vme_attr = kmalloc_obj(*vme_attr, GFP_KERNEL);
|
||||
vme_attr = kmalloc_obj(*vme_attr);
|
||||
if (!vme_attr)
|
||||
goto err_vme;
|
||||
|
||||
@@ -1458,7 +1458,7 @@ struct vme_resource *vme_lm_request(struct vme_dev *vdev)
|
||||
if (!allocated_lm)
|
||||
goto err_lm;
|
||||
|
||||
resource = kmalloc_obj(*resource, GFP_KERNEL);
|
||||
resource = kmalloc_obj(*resource);
|
||||
if (!resource)
|
||||
goto err_alloc;
|
||||
|
||||
@@ -1810,7 +1810,7 @@ static int __vme_register_driver_bus(struct vme_driver *drv,
|
||||
struct vme_dev *tmp;
|
||||
|
||||
for (i = 0; i < ndevs; i++) {
|
||||
vdev = kzalloc_obj(*vdev, GFP_KERNEL);
|
||||
vdev = kzalloc_obj(*vdev);
|
||||
if (!vdev) {
|
||||
err = -ENOMEM;
|
||||
goto err_devalloc;
|
||||
|
||||
@@ -1073,13 +1073,13 @@ static int __init fake_init(void)
|
||||
/* If we want to support more than one bridge at some point, we need to
|
||||
* dynamically allocate this so we get one per device.
|
||||
*/
|
||||
fake_bridge = kzalloc_obj(*fake_bridge, GFP_KERNEL);
|
||||
fake_bridge = kzalloc_obj(*fake_bridge);
|
||||
if (!fake_bridge) {
|
||||
retval = -ENOMEM;
|
||||
goto err_struct;
|
||||
}
|
||||
|
||||
fake_device = kzalloc_obj(*fake_device, GFP_KERNEL);
|
||||
fake_device = kzalloc_obj(*fake_device);
|
||||
if (!fake_device) {
|
||||
retval = -ENOMEM;
|
||||
goto err_driver;
|
||||
@@ -1102,7 +1102,7 @@ static int __init fake_init(void)
|
||||
/* Add master windows to list */
|
||||
INIT_LIST_HEAD(&fake_bridge->master_resources);
|
||||
for (i = 0; i < FAKE_MAX_MASTER; i++) {
|
||||
master_image = kmalloc_obj(*master_image, GFP_KERNEL);
|
||||
master_image = kmalloc_obj(*master_image);
|
||||
if (!master_image) {
|
||||
retval = -ENOMEM;
|
||||
goto err_master;
|
||||
@@ -1128,7 +1128,7 @@ static int __init fake_init(void)
|
||||
/* Add slave windows to list */
|
||||
INIT_LIST_HEAD(&fake_bridge->slave_resources);
|
||||
for (i = 0; i < FAKE_MAX_SLAVE; i++) {
|
||||
slave_image = kmalloc_obj(*slave_image, GFP_KERNEL);
|
||||
slave_image = kmalloc_obj(*slave_image);
|
||||
if (!slave_image) {
|
||||
retval = -ENOMEM;
|
||||
goto err_slave;
|
||||
@@ -1150,7 +1150,7 @@ static int __init fake_init(void)
|
||||
|
||||
/* Add location monitor to list */
|
||||
INIT_LIST_HEAD(&fake_bridge->lm_resources);
|
||||
lm = kmalloc_obj(*lm, GFP_KERNEL);
|
||||
lm = kmalloc_obj(*lm);
|
||||
if (!lm) {
|
||||
retval = -ENOMEM;
|
||||
goto err_lm;
|
||||
|
||||
@@ -1611,7 +1611,7 @@ static int tsi148_dma_list_add(struct vme_dma_list *list, struct vme_dma_attr *s
|
||||
tsi148_bridge = list->parent->parent;
|
||||
|
||||
/* Descriptor must be aligned on 64-bit boundaries */
|
||||
entry = kmalloc_obj(*entry, GFP_KERNEL);
|
||||
entry = kmalloc_obj(*entry);
|
||||
if (!entry) {
|
||||
retval = -ENOMEM;
|
||||
goto err_mem;
|
||||
@@ -2260,14 +2260,14 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
/* If we want to support more than one of each bridge, we need to
|
||||
* dynamically generate this so we get one per device
|
||||
*/
|
||||
tsi148_bridge = kzalloc_obj(*tsi148_bridge, GFP_KERNEL);
|
||||
tsi148_bridge = kzalloc_obj(*tsi148_bridge);
|
||||
if (!tsi148_bridge) {
|
||||
retval = -ENOMEM;
|
||||
goto err_struct;
|
||||
}
|
||||
vme_init_bridge(tsi148_bridge);
|
||||
|
||||
tsi148_device = kzalloc_obj(*tsi148_device, GFP_KERNEL);
|
||||
tsi148_device = kzalloc_obj(*tsi148_device);
|
||||
if (!tsi148_device) {
|
||||
retval = -ENOMEM;
|
||||
goto err_driver;
|
||||
@@ -2349,7 +2349,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
/* Add master windows to list */
|
||||
for (i = 0; i < master_num; i++) {
|
||||
master_image = kmalloc_obj(*master_image, GFP_KERNEL);
|
||||
master_image = kmalloc_obj(*master_image);
|
||||
if (!master_image) {
|
||||
retval = -ENOMEM;
|
||||
goto err_master;
|
||||
@@ -2375,7 +2375,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
/* Add slave windows to list */
|
||||
for (i = 0; i < TSI148_MAX_SLAVE; i++) {
|
||||
slave_image = kmalloc_obj(*slave_image, GFP_KERNEL);
|
||||
slave_image = kmalloc_obj(*slave_image);
|
||||
if (!slave_image) {
|
||||
retval = -ENOMEM;
|
||||
goto err_slave;
|
||||
@@ -2396,7 +2396,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
/* Add dma engines to list */
|
||||
for (i = 0; i < TSI148_MAX_DMA; i++) {
|
||||
dma_ctrlr = kmalloc_obj(*dma_ctrlr, GFP_KERNEL);
|
||||
dma_ctrlr = kmalloc_obj(*dma_ctrlr);
|
||||
if (!dma_ctrlr) {
|
||||
retval = -ENOMEM;
|
||||
goto err_dma;
|
||||
@@ -2416,7 +2416,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
}
|
||||
|
||||
/* Add location monitor to list */
|
||||
lm = kmalloc_obj(*lm, GFP_KERNEL);
|
||||
lm = kmalloc_obj(*lm);
|
||||
if (!lm) {
|
||||
retval = -ENOMEM;
|
||||
goto err_lm;
|
||||
|
||||
@@ -464,7 +464,7 @@ static int vme_user_master_mmap(unsigned int minor, struct vm_area_struct *vma)
|
||||
return err;
|
||||
}
|
||||
|
||||
vma_priv = kmalloc_obj(*vma_priv, GFP_KERNEL);
|
||||
vma_priv = kmalloc_obj(*vma_priv);
|
||||
if (!vma_priv) {
|
||||
mutex_unlock(&image[minor].mutex);
|
||||
return -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user