mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
V4L/DVB (13018): kzalloc failure ignored in au8522_probe()
Prevent NULL dereference if kzalloc() fails. Cc: Devin Heitmueller <[email protected]> Signed-off-by: Roel Kluin <[email protected]> Signed-off-by: Douglas Schilling Landgraf <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
d8370f7eff
commit
40d2951758
1 changed files with 5 additions and 0 deletions
|
|
@ -792,6 +792,11 @@ static int au8522_probe(struct i2c_client *client,
|
|||
}
|
||||
|
||||
demod_config = kzalloc(sizeof(struct au8522_config), GFP_KERNEL);
|
||||
if (demod_config == NULL) {
|
||||
if (instance == 1)
|
||||
kfree(state);
|
||||
return -ENOMEM;
|
||||
}
|
||||
demod_config->demod_address = 0x8e >> 1;
|
||||
|
||||
state->config = demod_config;
|
||||
|
|
|
|||
Loading…
Reference in a new issue