• Dave Jones's avatar
    [CPUFREQ] Check return value of cpufreq_cpu_get in cpufreq_stats · bc7b26fd
    Dave Jones authored
    This fixes an issue found in drivers/cpufreq/cpufreq_stats.c by Coverity.
    
    Error reported:
    CID: 2642
    Checker: NULL_RETURNS (help)
    File: /export2/p4-coverity/mc2/linux26/drivers/cpufreq/cpufreq_stats.c
    Function: cpufreq_stats_create_table
    Description: Dereferencing NULL value "data"
    
    Patch description:
     The return of cpufreq_cpu_get can be NULL, check return code and return
     -EINVAL if it is NULL.
    
    Signed-off-by: Jayachandran C. <c.jayachandran at gmail.com>
    Signed-off-by: default avatarDave Jones <davej@redhat.com>
    bc7b26fd
cpufreq_stats.c 8.63 KB