diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c index 3d3d1578119a..16695cb5e69c 100644 --- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c +++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c @@ -379,8 +379,8 @@ static int pci1xxxx_otp_eeprom_probe(struct auxiliary_device *aux_dev, priv->nvmem_eeprom = devm_nvmem_register(&aux_dev->dev, &priv->nvmem_config_eeprom); - if (!priv->nvmem_eeprom) - return -ENOMEM; + if (IS_ERR(priv->nvmem_eeprom)) + return PTR_ERR(priv->nvmem_eeprom); } release_sys_lock(priv); @@ -398,8 +398,8 @@ static int pci1xxxx_otp_eeprom_probe(struct auxiliary_device *aux_dev, priv->nvmem_otp = devm_nvmem_register(&aux_dev->dev, &priv->nvmem_config_otp); - if (!priv->nvmem_otp) - return -ENOMEM; + if (IS_ERR(priv->nvmem_otp)) + return PTR_ERR(priv->nvmem_otp); return ret; } |