lkml.org 
[lkml]   [2014]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5/5] efi_rtc: probe function error out in case no efi runtime enabled
    Date
    efi rtc depends on efi runtime services, so if efi runtime services are not
    usable it should error out.

    Without this patch rtc-efi will panic with 'noefi' boot

    Signed-off-by: Dave Young <dyoung@redhat.com>
    ---
    drivers/rtc/rtc-efi.c | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
    index 8225b89..8c02ed8 100644
    --- a/drivers/rtc/rtc-efi.c
    +++ b/drivers/rtc/rtc-efi.c
    @@ -213,6 +213,9 @@ static int __init efi_rtc_probe(struct platform_device *dev)
    {
    struct rtc_device *rtc;

    + if (!efi_enabled(EFI_RUNTIME_SERVICES))
    + return -ENODEV;
    +
    rtc = devm_rtc_device_register(&dev->dev, "rtc-efi", &efi_rtc_ops,
    THIS_MODULE);
    if (IS_ERR(rtc))
    --
    1.8.3.1


    \
     
     \ /
      Last update: 2014-08-12 08:21    [W:3.233 / U:0.292 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site