Messages in this thread Patch in this message | | | From | David Cohen <> | Subject | [PATCH v2 3/3] x86: intel-mid: return proper error code from get_gpio_by_name() | Date | Fri, 20 Dec 2013 17:15:13 -0800 |
| |
get_gpio_by_name() should return an error code instead of hardcoded -1.
Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> --- arch/x86/platform/intel-mid/sfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c index 1d5d20b088fa..438306ebed05 100644 --- a/arch/x86/platform/intel-mid/sfi.c +++ b/arch/x86/platform/intel-mid/sfi.c @@ -224,7 +224,7 @@ int get_gpio_by_name(const char *name) if (!strncmp(name, pentry->pin_name, SFI_NAME_LEN)) return pentry->pin_no; } - return -1; + return -EINVAL; } void __init intel_scu_device_register(struct platform_device *pdev) -- 1.8.4.2
| |