能帮我看一下我的链表哪里错了吗please

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果

#include<stdio.h>
#include<stdlib.h>
typedef struct list{
    int date;
    struct list* next;

}node;
int main()
{
    int a;
    int b;
    int i,j;
    printf("请输入链表节点为几");
    scanf_s("%d", &a);
    printf("请输入链表数据");
    int* p = (int*)malloc(a * sizeof(int));
    for (j = 0; j < a; j++)
    {
        scanf_s("%d\n", &p[j]);
    }
    node* head = (node*)malloc(sizeof(node));
    head->next = NULL;
    for (i = 0; i < a; i++)
    {
        node*node1= (node*)malloc( sizeof(node));
        node1->date = p[j];
        node1->next = head->next;
        head->next = node1;

    }
    return head;
    node* h;
    h = head->next;
    while (p!= NULL)
    {
        printf("%d",h->date );
        h = h->next;
    }

修改处见注释,供参考:

#include<stdio.h>
#include<stdlib.h>
typedef struct list{
    int date;
    struct list* next;

}node;
int main()
{
    int a;
    int b;
    int i,j;
    printf("请输入链表节点为几");
    scanf_s("%d", &a);
    printf("请输入链表数据");
    int* p = (int*)malloc(a * sizeof(int));
    for (j = 0; j < a; j++)
    {
        scanf_s("%d", &p[j]); //scanf_s("%d\n", &p[j]);
    }
    node* head = (node*)malloc(sizeof(node));
    head->next = NULL;
    for (i = 0; i < a; i++)
    {
        node*node1= (node*)malloc( sizeof(node));
        node1->date = p[i];    //node1->date = p[j];
        node1->next = head->next;
        head->next = node1;

    }
                            //return head;
    node* h;
    h = head->next;
    while (h!= NULL)        //while (p!= NULL)
    {
        printf("%d",h->date );
        h = h->next;
    }
    return 0;
}