media: cx23885: check allocation return
authorNicholas Mc Guire <hofrat@osadl.org>
Sun, 20 Jan 2019 03:52:23 +0000 (22:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jan 2020 09:24:19 +0000 (10:24 +0100)
commit4ccb5367cd7ce53aba9a595d20b8cd2bc7fcca29
treec0bb955fdfff4d1042a697f8bcdb7ebdf28f02c6
parente53ee1dce1d93adab4a78ea3fdec2d3475fa5891
media: cx23885: check allocation return

[ Upstream commit a3d7f22ef34ec4206b50ee121384d5c8bebd5591 ]

Checking of kmalloc() seems to have been committed - as
cx23885_dvb_register() is checking for != 0 return, returning
-ENOMEM should be fine here.  While at it address the coccicheck
suggestion to move to kmemdup rather than using kmalloc+memcpy.

Fixes: 46b21bbaa8a8 ("[media] Add support for DViCO FusionHDTV DVB-T Dual Express2")

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/pci/cx23885/cx23885-dvb.c