Found with covscan.
Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
mc_fail:
- if(sockfd > 0){
+ if(sockfd >= 0){
close(sockfd);
}
aer_fail:
- if(sockfd > 0){
+ if(sockfd >= 0){
close(sockfd);
}
non_standard_fail:
- if(sockfd > 0){
+ if(sockfd >= 0){
close(sockfd);
}
arm_fail:
- if(sockfd > 0){
+ if(sockfd >= 0){
close(sockfd);
}
mce_fail:
- if(sockfd > 0){
+ if(sockfd >= 0){
close(sockfd);
}
devlink_fail:
- if(sockfd > 0){
+ if(sockfd >= 0){
close(sockfd);
}
done = 1;
diskerror_fail:
- if(sockfd > 0){
+ if(sockfd >= 0){
close(sockfd);
}
done = 1;
mf_fail:
- if (sockfd > 0)
+ if (sockfd >= 0)
close(sockfd);
if (done)