> +int mucse_read_mbx(struct mucse_hw *hw, u32 *msg, u16 size) > +{ > + struct mucse_mbx_info *mbx = &hw->mbx; > + > + /* limit read size */ > + min(size, mbx->size); > + return mbx->ops->read(hw, msg, size); As well as the obvious bug pointed out by others, isn't this condition actually indicating a bug somewhere else? If size is bigger than mbx->size, the caller is broken. You probably want a dev_err() here, and return -EINVAL, so you get a hint something else is broken somewhere. Andrew