Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65694
b: refs/heads/master
c: b2a6576
h: refs/heads/master
v: v3
  • Loading branch information
Mariusz Kozlowski authored and Mauro Carvalho Chehab committed Oct 10, 2007
1 parent 7dc5837 commit 63bd9c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3873dd041465799cfdeb642531c0ade4fb6614e5
refs/heads/master: b2a657603e7285bf05b86ad198111b5403c57b41
9 changes: 5 additions & 4 deletions trunk/drivers/media/video/msp3400-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,8 +813,9 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind)
int msp_rom;

client = kzalloc(sizeof(*client), GFP_KERNEL);
if (client == NULL)
if (!client)
return -ENOMEM;

client->addr = address;
client->adapter = adapter;
client->driver = &i2c_driver;
Expand All @@ -826,14 +827,14 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind)
return 0;
}

state = kmalloc(sizeof(*state), GFP_KERNEL);
if (state == NULL) {
state = kzalloc(sizeof(*state), GFP_KERNEL);
if (!state) {
kfree(client);
return -ENOMEM;
}

i2c_set_clientdata(client, state);

memset(state, 0, sizeof(*state));
state->v4l2_std = V4L2_STD_NTSC;
state->audmode = V4L2_TUNER_MODE_STEREO;
state->volume = 58880; /* 0db gain */
Expand Down

0 comments on commit 63bd9c7

Please sign in to comment.