• Jean Delvare's avatar
    PCI/AER: Fix aer_inject error codes · 20ac75e5
    Jean Delvare authored
    EPERM means "Operation not permitted", which doesn't reflect the lack of
    support for AER.  EPROTONOSUPPORT (Protocol not supported) is a better
    choice of error code if the device or its root port lack support for AER.
    
    Likewise, EINVAL means "Invalid argument", which is not suitable for cases
    where the AER error device is missing or unusable.  ENODEV and
    EPROTONOSUPPORT, respectively, fit better.
    Suggested-by: default avatarBorislav Petkov <bp@suse.de>
    Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    CC: Borislav Petkov <bp@suse.de>
    CC: Prarit Bhargava <prarit@redhat.com>
    20ac75e5
aer_inject.c 13.2 KB