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:
Sven Schnelle
2015-11-23 15:49:53 +01:00
parent 5f5b38e4cc
commit a55acf2846

View File

@@ -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;