I am trying to write GPIO sysfs driver implementation from stratch. When i use final code, it gives error: Unknown symbol __stack_chk_guard
When I trimmed my code to find which line this error occurred in, I first found the following line.of_property_read_string(child, "label", &name);
Because the very simple code below also gives the same error.
#include<linux/module.h>
#include <linux/of.h>
/*Module's init entry point */
static int __init helloworld_init(void)
{
const char *name;
of_property_read_string(NULL, "label", &name);
pr_info("Hello worldn");
return 0;
}
/*Module's cleanup entry point */
static void __exit helloworld_cleanup(void)
{
pr_info("Good bye worldn");
}
module_init(helloworld_init);
module_exit(helloworld_cleanup);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("asdsa");
How can i fix the error?