diff options
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/s5k5baf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c index 96e7a4834130..297ef04e146a 100644 --- a/drivers/media/i2c/s5k5baf.c +++ b/drivers/media/i2c/s5k5baf.c @@ -374,6 +374,8 @@ static int s5k5baf_fw_parse(struct device *dev, struct s5k5baf_fw **fw, count -= S5K5BAG_FW_TAG_LEN; d = devm_kzalloc(dev, count * sizeof(u16), GFP_KERNEL); + if (!d) + return -ENOMEM; for (i = 0; i < count; ++i) d[i] = le16_to_cpu(data[i]); |