The following code looks a bit mixed up, doesn't it?
/\* \_\_ipmi\_fru\_print - Do actual work to print a FRU by its ID
\*
\* @intf: ipmi interface
\* @id: fru id
\*
\* returns -1 on error
\* returns 0 if successful
\* returns 1 if device not present
\*/
static int
\_\_ipmi\_fru\_print\(struct ipmi\_intf \* intf, uint8\_t id\)
\{
rsp = intf->sendrecv\(intf, &req\);
if \(rsp == NULL\) \{
printf\(" Device not present \(No Response\)\n"\);
return -1;
\}
if \(rsp->ccode > 0\) \{
printf\(" Device not present \(%s\)\n",
val2str\(rsp->ccode, completion\_code\_vals\)\);
return -1;
\}
\[...\]
rsp = intf->sendrecv\(intf, &req\);
if \(rsp == NULL\) \{
printf\(" Device not present \(No Response\)\n"\);
return 1;
\}
if \(rsp->ccode > 0\) \{
printf\(" Device not present \(%s\)\n",
val2str\(rsp->ccode, completion\_code\_vals\)\);
return 1;
\}
\[...\]
\}