From: Borislav Petkov Date: Wed, 1 Sep 2010 14:32:20 +0000 (+0200) Subject: EDAC: Fix error return X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca755e0a49ff1272efff0b3bfdf3f1e0b0fc5d57;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git EDAC: Fix error return We should return a negative value when we cannot get the toplevel edac sysfs class. Signed-off-by: Borislav Petkov --- diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 8aad94d10c0..aa93ad82ee0 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c @@ -1011,7 +1011,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) */ int edac_sysfs_setup_mc_kset(void) { - int err = 0; + int err = -EINVAL; struct sysdev_class *edac_class; debugf1("%s()\n", __func__);