diff options
Diffstat (limited to 'drivers/pinctrl/intel/pinctrl-baytrail.c')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-baytrail.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c index 241384ead4ed..18d9ad504194 100644 --- a/drivers/pinctrl/intel/pinctrl-baytrail.c +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c @@ -1710,6 +1710,8 @@ static int byt_gpio_probe(struct byt_gpio *vg) #ifdef CONFIG_PM_SLEEP vg->saved_context = devm_kcalloc(&vg->pdev->dev, gc->ngpio, sizeof(*vg->saved_context), GFP_KERNEL); + if (!vg->saved_context) + return -ENOMEM; #endif ret = devm_gpiochip_add_data(&vg->pdev->dev, gc, vg); if (ret) { |