Commit b343b5bd authored by Federico Vaga's avatar Federico Vaga

kernel: prevent crash on errors

On ZIO loading errors we do not have any zio_device, but the kil buffer
function is used anyway. This patch prevent a kernel oops is that case.
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 8abdf7dd
......@@ -75,6 +75,8 @@ static enum ft_devtype __ft_get_type(struct device *dev)
void ft_zio_kill_buffer(struct fmctdc_dev *ft, int channel)
{
if (ft->zdev)
return;
zio_trigger_abort_disable(&ft->zdev->cset[channel - FT_CH_1], 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment