Commit 5e4a750e authored by Federico Vaga's avatar Federico Vaga

drv: validate VME resource

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 025226bf
......@@ -807,6 +807,9 @@ int svec_fpga_init(struct svec_dev *svec_dev, unsigned int function_nr)
struct resource *r = &vdev->resource[function_nr];
int err;
if (r->flags != IORESOURCE_MEM)
return -EINVAL;
svec_fpga = kzalloc(sizeof(*svec_fpga), GFP_KERNEL);
if (!svec_fpga)
return -ENOMEM;
......
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