projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[media] media: i2c: Convert to devm_kzalloc()
[deliverable/linux.git]
/
drivers
/
media
/
i2c
/
vp27smpx.c
diff --git
a/drivers/media/i2c/vp27smpx.c
b/drivers/media/i2c/vp27smpx.c
index e71f139695afa1f23405f533d206583100574da8..208a095d7bcc96b8791c4f551f5fe87f08997a48 100644
(file)
--- a/
drivers/media/i2c/vp27smpx.c
+++ b/
drivers/media/i2c/vp27smpx.c
@@
-169,7
+169,7
@@
static int vp27smpx_probe(struct i2c_client *client,
v4l_info(client, "chip found @ 0x%x (%s)\n",
client->addr << 1, client->adapter->name);
v4l_info(client, "chip found @ 0x%x (%s)\n",
client->addr << 1, client->adapter->name);
- state =
kzalloc(sizeof(struct vp27smpx_
state), GFP_KERNEL);
+ state =
devm_kzalloc(&client->dev, sizeof(*
state), GFP_KERNEL);
if (state == NULL)
return -ENOMEM;
sd = &state->sd;
if (state == NULL)
return -ENOMEM;
sd = &state->sd;
@@
-186,7
+186,6
@@
static int vp27smpx_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
v4l2_device_unregister_subdev(sd);
struct v4l2_subdev *sd = i2c_get_clientdata(client);
v4l2_device_unregister_subdev(sd);
- kfree(to_state(sd));
return 0;
}
return 0;
}
This page took
0.041147 seconds
and
5
git commands to generate.