mirror of
https://github.com/patjak/facetimehd.git
synced 2026-04-09 11:02:31 +02:00
bcwc_pcie: check return value from bcwc_channel_ringbuf_send()
It might return NULL, which would cause a kernel crash.
This commit is contained in:
@@ -297,6 +297,10 @@ int bcwc_isp_cmd(struct bcwc_private *dev_priv, enum bcwc_isp_cmds command, void
|
||||
entry = bcwc_channel_ringbuf_send(dev_priv, dev_priv->channel_io,
|
||||
request->offset, request_len + 8, (response_len ? *response_len : 0) + 8);
|
||||
|
||||
if (!entry) {
|
||||
ret = -EIO;
|
||||
goto out;
|
||||
}
|
||||
if (command == CISP_CMD_POWER_DOWN) {
|
||||
/* powerdown doesn't seem to generate a response */
|
||||
ret = 0;
|
||||
|
||||
Reference in New Issue
Block a user