mirror of
https://github.com/patjak/facetimehd.git
synced 2026-04-09 11:02:31 +02:00
facetimehd: return error if channel list is empty
Signed-off-by: Sven Schnelle <svens@stackframe.org>
This commit is contained in:
@@ -209,13 +209,14 @@ static int isp_fill_channel_info(struct fthd_private *dev_priv, int offset, int
|
||||
int i;
|
||||
|
||||
if (!num_channels)
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
|
||||
dev_priv->num_channels = num_channels;
|
||||
dev_priv->channels = kzalloc(num_channels * sizeof(struct fw_channel *), GFP_KERNEL);
|
||||
if (!dev_priv->channels)
|
||||
goto out;
|
||||
|
||||
dev_priv->num_channels = num_channels;
|
||||
|
||||
for(i = 0; i < num_channels; i++) {
|
||||
FTHD_S2_MEMCPY_FROMIO(&info, offset + i * 256, sizeof(info));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user