]> Git Repo - linux.git/blobdiff - drivers/rtc/proc.c
regmap: mmio: Allow passing an empty config->reg_stride
[linux.git] / drivers / rtc / proc.c
index 73344598fc1bef235f6341d2bcc5f4da3482e9a9..cbcdbb19d848e78e6674bd626833151a99773ef0 100644 (file)
@@ -23,8 +23,8 @@ static bool is_rtc_hctosys(struct rtc_device *rtc)
        int size;
        char name[NAME_SIZE];
 
-       size = scnprintf(name, NAME_SIZE, "rtc%d", rtc->id);
-       if (size > NAME_SIZE)
+       size = snprintf(name, NAME_SIZE, "rtc%d", rtc->id);
+       if (size >= NAME_SIZE)
                return false;
 
        return !strncmp(name, CONFIG_RTC_HCTOSYS_DEVICE, NAME_SIZE);
This page took 0.034116 seconds and 4 git commands to generate.